Problem reverseandmin
User r1r2r3r4
Submission Time 2026-04-08 15:34:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

reverseandmin.cpp: In function ‘int main()’:
reverseandmin.cpp:14:25: error: expected ‘;’ before ‘long’
14 | if (rx < x) swap(rx, x)
| ^
| ;
reverseandmin.cpp:20:32: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
20 | for (int i = x;i<=N;i*=10) ans++;
| ^~~
| abs
reverseandmin.cpp:21:44: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
21 | if (rx != x) for (int i=rx;i<=N;i*=10) ans++;
| ^~~
| abs
reverseandmin.cpp:22:13: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
22 | cout << ans;
| ^~~
| abs