Problem spreadsheet
User chien
Submission Time 2025-06-19 13:17:45
Score 0
Max Time N/A
Max Memory N/A

Compile Error

spreadsheet.cpp: In function ‘int main()’:
spreadsheet.cpp:3:5: error: ‘cin’ was not declared in this scope
3 | cin >> n >> p >> k;
| ^~~
spreadsheet.cpp:4:9: error: ‘abs’ was not declared in this scope
4 | if (abs(k) > n*p){
| ^~~
spreadsheet.cpp:5:9: error: ‘cout’ was not declared in this scope
5 | cout << -1;
| ^~~~
spreadsheet.cpp:8:13: error: ‘cout’ was not declared in this scope
8 | cout << abs(k/p) + 1;
| ^~~~
spreadsheet.cpp:10:12: error: ‘cout’ was not declared in this scope
10 | cout << abs(k/p); //abs as p might be negative, but changes is always positive
| ^~~~