266 views

ans is 0??

edited
If p > a then,

if a and p are coprime then $a^{p-1} = 1 mod p$

If a and p are not coprime then $a^{p-1} = a mod p$

But here not the case
ashwin here this not work r cannot go beyond of 2 since P < a
Ohh yes sorry my bad :(

6^2=36mod 3=0

So the ans is 0.