Problem exponentiate
User ilikeeggs
Submission Time 2024-07-08 14:15:47
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exponentiate.cpp: In function ‘int32_t main()’:
exponentiate.cpp:20:24: error: invalid operands of types ‘__gnu_cxx::__promote_2<long long int, long long int, double, double>::__type’ {aka ‘double’} and ‘long long int’ to binary ‘operator%’
20 | result = (pow(A, B)) % M;
| ~~~~~~~~~~~ ^ ~
| | |
| | long long int
| __gnu_cxx::__promote_2<long long int, long long int, double, double>::__type {aka double}