Problem | exponentiate |
---|---|
User | christal |
Submission Time | 2023-12-20 15:00:20 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
exponentiate.cpp: In function ‘int main()’:
exponentiate.cpp:7:9: error: ‘b’ was not declared in this scope
7 | if (b == 0) return 1;
| ^
exponentiate.cpp:8:9: error: ‘b’ was not declared in this scope
8 | if (b % 2 == 1) return (expo(a, b-1) * a)%MOD;
| ^
exponentiate.cpp:8:34: error: ‘a’ was not declared in this scope
8 | if (b % 2 == 1) return (expo(a, b-1) * a)%MOD;
| ^
exponentiate.cpp:9:21: error: ‘a’ was not declared in this scope
9 | int save = expo(a, b/2);
| ^
exponentiate.cpp:9:24: error: ‘b’ was not declared in this scope
9 | int save = expo(a, b/2);
| ^
exponentiate.cpp:10:25: error: invalid operands of types ‘int’ and ‘int [1000005]’ to binary ‘operator%’
10 | return (save * save)%MOD;
| ~~~~~~~~~~~~~^~~~
| |