Problem lunchbox
User yuxiangt
Submission Time 2025-07-26 23:37:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:18:13: error: expected primary-expression before ‘<’ token
18 | if(total =< n){
| ^
lunchbox.cpp:23:9: error: expected ‘;’ before ‘}’ token
23 | break
| ^
| ;
24 | }
| ~
lunchbox.cpp:25:6: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘long long int’)
25 | cout>>count;
| ~~~~^~~~~~~
| | |
| | long long int
| std::ostream {aka std::basic_ostream<char>}
lunchbox.cpp:25:6: note: candidate: ‘operator>>(int, long long int)’ <built-in>
25 | cout>>count;
| ~~~~^~~~~~~
lunchbox.cpp:25:6: note: no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file included from /usr/include/x86_64-linux-gnu/c++/9/