Problem exponentiate
User P55D2K
Submission Time 2023-04-25 14:06:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exponentiate.cpp: In function ‘int main()’:
exponentiate.cpp:16:19: error: invalid operands of types ‘long double’ and ‘int’ to binary ‘operator&’
16 | if (b & 1) { res = (res * a) % m; }
| ~ ^ ~
| | |
| | int
| long double
exponentiate.cpp:16:42: error: invalid operands of types ‘long double’ and ‘long double’ to binary ‘operator%’
16 | if (b & 1) { res = (res * a) % m; }
| ~~~~~~~~~ ^ ~
| | |
| | long double
| long double
exponentiate.cpp:17:19: error: invalid operands of types ‘long double’ and ‘int’ to binary ‘operator>>’
17 | b = b >> 1;
| ~ ^~ ~
| | |
|