Task: | Pizzat |
Sender: | Username* |
Submission time: | 2024-10-28 09:56:15 +0200 |
Language: | C++ (C++20) |
Status: | COMPILE ERROR |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:14:18: error: 'floor' was not declared in this scope 14 | float ans2 = floor(ans) == ans ? ans : floor(ans) + 1; | ^~~~~
Code
#include <vector> #include <algorithm> #include <iostream> #include <queue> #include <map> using namespace std; int main() { float n, m, k; cin >> n >> m >> k; float ans = (m * k)/n; float ans2 = floor(ans) == ans ? ans : floor(ans) + 1; cout << floor(ans) << " " << ans2; return 0; }