Power questtion

what is the problem is my code…it is just passing one test case
#include
using namespace std;
int main() {
int a,b;
int num = 1;
cin>>a>>b;
for(int i = b ; i > 0 ; i–){
num *= a;
}
cout<<num;
return 0;
}

your answer may overflow the int capacity
use long long int

Now it passed the test cases … thanks

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.