Problem exponentiate
User zsinfo2010
Submission Time 2023-11-10 13:46:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exponentiate.cpp: In function ‘int32_t main()’:
exponentiate.cpp:7:9: error: ‘cin’ was not declared in this scope
7 | int t; cin>>t;
| ^~~
exponentiate.cpp:3:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
2 | #include <math.h>
+++ |+#include <iostream>
3 | using namespace std;
exponentiate.cpp:4:13: error: expected primary-expression before ‘long’
4 | #define int long long
| ^~~~
exponentiate.cpp:13:18: note: in expansion of macro ‘int’
13 | int result=pow(int base, int exponent) % m;
| ^~~
exponentiate.cpp:4:13: error: expected primary-expression before ‘long’
4 | #define int long long
| ^~~~
exponentiate.cpp:13:28: note: in expansion of macro ‘int’
13 | int result=pow(int base, int exponent) % m;
| ^~~
exponent