Test cases failed

int a , b;
cin >> a >> b;

int ans = pow(a , b) ;

cout << ans ;

if i write this way , all the test cases are being passed but

cin >> a >> b;
cout << pow(a , b) ;

in this way 2 test cases fails , why?

hi @aggarwal.naman21
Kindly share the ques u are referring to…

@aggarwal.naman21
I haven’t heard from u… shall i consider ur doubt as resolved??

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.