Problem exponentiate
User justin271828
Submission Time 2024-06-01 16:08:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exponentiate.cpp: In function ‘void exp(int, int, int)’:
exponentiate.cpp:8:42: error: invalid operands of types ‘void’ and ‘void’ to binary ‘operator*’
8 | if (b%2 == 0) arr[b] = (exp(a, b/2, m) * exp(a, b/2, m))%m;
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
| | |
| void void
exponentiate.cpp:9:33: error: invalid operands of types ‘void’ and ‘void’ to binary ‘operator*’
9 | else arr[b] = (exp(a, b/2, m) * exp(a, b/2, m) * a)%m;
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
| | |
| void void