Borderou de evaluare (job #3264875)
Utilizator | Data | 24 decembrie 2024 21:21:43 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int fastEXP(int&, int&)':
main.cpp:17:44: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
17 | return ((long long)a%MOD * fastEXP(a, b-1)%MOD)%MOD;
| ~^~
main.cpp:12:26: note: initializing argument 2 of 'int fastEXP(int&, int&)'
12 | int fastEXP(int& a, int& b)
| ~~~~~^
main.cpp:20:23: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
20 | int p=fastEXP(a, b/2);
| ~^~
main.cpp:12:26: note: initializing argument 2 of 'int fastEXP(int&, int&)'
12 | int fastEXP(int& a, int& b)
| ~~~~~^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !