| Problem | exponentiate |
|---|---|
| User | christal |
| Submission Time | 2023-12-20 15:01:03 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
exponentiate.cpp: In function ‘int main()’:
exponentiate.cpp:7:15: error: expression list treated as compound expression in initializer [-fpermissive]
7 | int expo(a, b);
| ^
exponentiate.cpp:9:40: error: ‘expo’ cannot be used as a function
9 | if (b % 2 == 1) return (expo(a, b-1) * a)%MOD;
| ^
exponentiate.cpp:10:27: error: ‘expo’ cannot be used as a function
10 | int save = expo(a, b/2);
| ^
exponentiate.cpp:11:25: error: invalid operands of types ‘int’ and ‘int [1000005]’ to binary ‘operator%’
11 | return (save * save)%MOD;
| ~~~~~~~~~~~~~^~~~
| | |
| int int [1000005]