Problem | exponentiate |
---|---|
User | hwy |
Submission Time | 2023-06-07 18:31:46 |
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:9:10: error: ‘a’ was not declared in this scope
9 | return a;
| ^
exponentiate.cpp:10:26: 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 ans = pow(A, B/2) % 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:9: error: ‘t’ was not declared in this scope
19 | cin >> t;
| ^
exponentiate.cpp:23:28: error: no matching function for call to ‘pow(ll&, ll&, ll&)’
23 | cout << pow(A, B, M)%M << '\n';<