I am unable to think the correct solution to this problem. There is no editorial avaliable. Please give some hints on how to approach this problem
Math Day problem in Mathematics challenges
@saksham20189575 use two things, Fast exponentiation under modulo and property.
n^(a*b)=(n^a)^b Break factorial like this.
If this resolves your doubt mark it as resolved.