Problem | exponentiate |
---|---|
User | hwy |
Submission Time | 2023-06-07 18:08:04 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
exponentiate.cpp: In function ‘ll power(ll, ll, ll)’:
exponentiate.cpp:10:23: error: invalid operands of types ‘__gnu_cxx::__promote_2<long long int, long long int, double, double>::__type’ {aka ‘double’} and ‘ll’ {aka ‘long long int’} to binary ‘operator%’
10 | ll res = pow(A, B)%M;
| ~~~~~~~~~^~
| | |
| | ll {aka long long int}
| __gnu_cxx::__promote_2<long long int, long long int, double, double>::__type {aka double}
exponentiate.cpp: In function ‘int main()’:
exponentiate.cpp:19:27: error: too few arguments to function ‘ll power(ll, ll, ll)’
19 | cout << power(A, B) << '\n';
| ^
exponentiate.cpp:5:4: note: declared here
5 | ll power(ll A, ll B, ll M) {
| ^~~~~