Problem exponentiate
User Logout
Submission Time 2023-11-20 14:43:18
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exponentiate.cpp: In function ‘long long int exponentiate(long long int, long long int, long long int)’:
exponentiate.cpp:7:8: error: ‘n’ was not declared in this scope
7 | while(n > 0){
| ^
exponentiate.cpp:8:24: error: ‘k’ was not declared in this scope
8 | if (n%2 == 1) v = (v*k) % m;
| ^
exponentiate.cpp:9:3: error: ‘x’ was not declared in this scope
9 | x = (x * x) % m;
| ^