Problem digits2
User jeongleean
Submission Time 2026-09-30 16:23:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

digits2.cpp: In function ‘int main()’:
digits2.cpp:50:49: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
50 | if (swap[j-1]==0 && swap[j]==1) ans+=2*c[j];
| ^~~
| abs
digits2.cpp:53:19: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
53 | cout<<ans<<"\n";
| ^~~
| abs