all test case except first passed what’s wrong?
Modular exponentiation number theory
Hello @hrishikeshjanjal,
- If you see the constraints carefully:
1<=a,b,c<=100000
for a=99999
The product of a*a will be greater than the range of int.
Problem:
As a is of type int so the product will be reduced to int even if it is long.
Solution:
Make it long.
I hope, it would help.
Give a like, if you are satisfied.
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.