Please explain the test case

please explain the test case

@sharad1103
For the given testcase ,
a = 2
b = 2
c = 3

We have to compute (a^b)mod c
a^b = 2^2 = 4
(a^b)mod c = (4) mod 3 = 4 % 3 = 1

Hence the final answer is 1.

a^b is a xor b ans a=b so xor must be zero

@sharad1103
By ^ , I mean the mathematical ^ which indicates power.This is pow(2,2) mod 3 = 4 mod 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.