Problem cuberoot
User Magenta
Submission Time 2026-06-25 16:37:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cuberoot.cpp: In function ‘int main()’:
cuberoot.cpp:3:13: error: expected primary-expression before ‘long’
3 | #define int long long
| ^~~~
cuberoot.cpp:17:4: note: in expansion of macro ‘int’
17 | (int l = 0, r = 1000000, ans = -1);
| ^~~
cuberoot.cpp:17:4: error: expected ‘)’ before ‘long’
17 | (int l = 0, r = 1000000, ans = -1);
| ~^
| )
cuberoot.cpp:18:9: error: ‘l’ was not declared in this scope
18 | while (l <= r)
| ^
cuberoot.cpp:18:14: error: ‘r’ was not declared in this scope
18 | while (l <= r)
| ^
cuberoot.cpp:22:4: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
22 | ans = mid;
| ^~~
| abs
cuberoot.cpp:29:6: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
29 | if (ans != -1)
| ^~~
| abs