Problem penguingathering
User key678
Submission Time 2026-06-24 15:32:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

penguingathering.cpp: In function ‘int main()’:
penguingathering.cpp:16:19: error: ‘i’ was not declared in this scope
16 | for ( int p = i; p < 1000; p++) {
| ^
penguingathering.cpp:18:19: error: expected unqualified-id before ‘=’ token
18 | for ( int = i = 0; i <N; i++){
| ^
penguingathering.cpp:18:19: error: expected ‘;’ before ‘=’ token
penguingathering.cpp:18:19: error: expected primary-expression before ‘=’ token
penguingathering.cpp:18:32: error: expected ‘)’ before ‘;’ token
18 | for ( int = i = 0; i <N; i++){
| ~ ^
| )
penguingathering.cpp: At global scope:
penguingathering.cpp:26:1: error: ‘cout’ does not name a type
26 | cout << ans << endl;
| ^~~~