Problem lunchbox
User minkison
Submission Time 2025-11-12 04:32:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:6:9: error: expected primary-expression before ‘int’
6 | cin >> int m;
| ^~~
lunchbox.cpp:7:9: error: expected primary-expression before ‘int’
7 | cin >> int n;
| ^~~
lunchbox.cpp:10:22: error: ‘n’ was not declared in this scope
10 | for (int i = 0; i < n; i++){
| ^
lunchbox.cpp:11:10: error: expected primary-expression before ‘int’
11 | cin >> int k;
| ^~~
lunchbox.cpp:12:12: error: ‘k’ was not declared in this scope
12 | total += k;
| ^
lunchbox.cpp:14:15: error: ‘m’ was not declared in this scope
14 | if (total > m){
| ^