Problem exponentiate
User Student101
Submission Time 2024-10-18 19:41:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exponentiate.cpp: In function ‘long long unsigned int modular_exponentiation(long long unsigned int, long long unsigned int, long long unsigned int)’:
exponentiate.cpp:18:35: error: expected ‘}’ at end of input
18 | base = (base * base) % mod; // base = base^2 % mod
| ^
exponentiate.cpp:10:21: note: to match this ‘{’
10 | while (exp > 0) {
| ^
exponentiate.cpp:18:35: error: expected ‘}’ at end of input
18 | base = (base * base) % mod; // base = base^2 % mod
| ^
exponentiate.cpp:6:116: note: to match this ‘{’
6 | unsigned long long modular_exponentiation(unsigned long long base, unsigned long long exp, unsigned long long mod) {
| ^