Problem exponentiate
User helloworld
Submission Time 2024-02-13 15:49:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exponentiate.cpp: In function ‘int main()’:
exponentiate.cpp:14:17: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
14 | for(int j = m - 1; j > 0; j--) {
| ~~^~~
| |
| int*
exponentiate.cpp:15:20: error: invalid operands of types ‘__gnu_cxx::__promote_2<int, int, double, double>::__type’ {aka ‘double’} and ‘int [(t + -1)]’ to binary ‘operator%’
15 | if(pow(a[i], j) % m == 1) {
| ~~~~~~~~~~~~ ^ ~
| | |
| | int [(t + -1)]
| __gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}