Hello, Check out problem F from this gym, https://mirror.codeforces.com/gym/100975/attachments Seems like an easy Euler-totient problem, and I think my idea is right too. I am using a^n = a^(n % phi[m] + phi[m]) mod m ; when n >= log m. But I don't get why I am getting an RE.
My code: https://mirror.codeforces.com/gym/100975/submission/127826630
Can anyone check the code for me? and please also let me know if these kinds of help-seeking entries are violating any community rule.
TIA <3



