Problem | exponentiate |
---|---|
User | MagicHenry |
Submission Time | 2025-06-18 23:16:33 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
exponentiate.cpp: In function ‘long long int exp(int, int, int)’:
exponentiate.cpp:6:5: error: ‘base’ was not declared in this scope
6 | base = base % mod;
| ^~~~
exponentiate.cpp:6:19: error: ‘mod’ was not declared in this scope; did you mean ‘modf’?
6 | base = base % mod;
| ^~~
| modf
exponentiate.cpp:7:16: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator>’
7 | while (exp > 0) {
| ~~~~^~~
exponentiate.cpp:8:17: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator%’
8 | if (exp % 2 == 1) {
| ~~~~^~~
exponentiate.cpp:12:16: error: overloaded function with no contextual type information
12 | exp /= 2;
| ^