Problem exponentiate
User blob
Submission Time 2023-12-27 13:15:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exponentiate.cpp: In function ‘int expo(int, int)’:
exponentiate.cpp:5:9: error: ‘b’ was not declared in this scope
5 | if (b == 0) return 1;
| ^
exponentiate.cpp:6:9: error: ‘b’ was not declared in this scope
6 | if (b % 2 == 1) return (expo(a, b-1) * a)%MOD;
| ^
exponentiate.cpp:6:34: error: ‘a’ was not declared in this scope
6 | if (b % 2 == 1) return (expo(a, b-1) * a)%MOD;
| ^
exponentiate.cpp:7:21: error: ‘a’ was not declared in this scope
7 | int save = expo(a, b/2);
| ^
exponentiate.cpp:7:24: error: ‘b’ was not declared in this scope
7 | int save = expo(a, b/2);
| ^