how is this expression (2^2)mod 3 = 1.
please explain the problem statement
Explain problem statement
@S19WDPP0014 The expression simply means that you have to raise a to the power b and then take the modulo. For example in this case a=2, b=2, c=3.
so 2^2= pow(2,2) = 4
4%c = 4%3 = 1.
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.
i cant seem to pass all the test cases please suggest me any optimisation.
@S19WDPP0014 you should pass variable c to your expo function and take modulo while updating result and a.
i have updated your code for same (https://ide.codingblocks.com/s/208480)