foo.cc: In function 'int main()':
foo.cc:7:18: warning: right operand of comma operator has no effect [-Wunused-value]
7 | for(i=0,i<n,i++)
| ~^~
foo.cc:7:24: error: expected ';' before ')' token
7 | for(i=0,i<n,i++)
| ^
| ;
foo.cc:15:23: error: 'penalty' was not declared in this scope
15 | printf("%d\n",penalty);
| ^~~~~~~
foo.cc:16:9: error: expected primary-expression before 'return'
16 | return 0;
| ^~~~~~
foo.cc:15:32: error: expected ')' before 'return'
15 | printf("%d\n",penalty);
| ^
| )
16 | return 0;
| ~~~~~~
foo.cc:7:12: note: to match this '('
7 | for(i=0,i<n,i++)
| ^
[Hydro](https://hydro.ac)提供评测服务