Task: | Pizzat |
Sender: | Username* |
Submission time: | 2024-10-28 10:02:29 +0200 |
Language: | C++ (C++20) |
Status: | COMPILE ERROR |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:15:23: error: 'floor' is not a member of 'std' 15 | float ans2 = std::floor(ans) == ans ? ans : ans + 1; | ^~~~~ input/code.cpp:17:23: error: 'floor' is not a member of 'std' 17 | std::cout << std::floor(ans) << " " << std::floor(ans2) << "\n"; | ^~~~~ input/code.cpp:17:49: error: 'floor' is not a member of 'std' 17 | std::cout << std::floor(ans) << " " << std::floor(ans2) << "\n"; | ^~~~~
Code
#include <vector>#include <algorithm>#include <iostream>#include <queue>#include <map>//#include <bits/stdc++.h>//using namespace std;int main() {float n, m, k;std::cin >> n >> m >> k;float ans = (m * k)/n;float ans2 = std::floor(ans) == ans ? ans : ans + 1;std::cout << std::floor(ans) << " " << std::floor(ans2) << "\n";return 0;}