CSES - Datatähti 2025 alku - Results
Submission details
Task:Pizzat
Sender:Pikaksi
Submission time:2024-10-28 10:58:10 +0200
Language:C++ (C++20)
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:10:18: error: 'floor' was not declared in this scope
   10 |     std::cout << floor(pieces / people) << " " << ceil(pieces / people);
      |                  ^~~~~
input/code.cpp:10:51: error: 'ceil' was not declared in this scope
   10 |     std::cout << floor(pieces / people) << " " << ceil(pieces / people);
      |                                                   ^~~~

Code

#include <iostream>

int main()
{
    double people, pizza, size;

    std::cin >> people >> pizza >> size;

    double pieces = pizza * size;
    std::cout << floor(pieces / people) << " " << ceil(pieces / people);
}