Problem exponentiate
User wongethan8192
Submission Time 2023-02-13 16:21:44
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exponentiate.cpp: In function ‘int main()’:
exponentiate.cpp:2:108: error: invalid operands of types ‘__gnu_cxx::__promote_2<long int, long int, double, double>::__type’ {aka ‘double’} and ‘long int’ to binary ‘operator%’
2 | using namespace std;int main(){int N;cin>>N;for(int i=0;i<N;i++){long int A,B,M;cin>>A>>B>>M;cout<<pow(A,B)%M;}}
| ~~~~~~~~^~
| | |
| | long int
| __gnu_cxx::__promote_2<long int, long int, double, double>::__type {aka double}