Need help regarding in problem on Number Theory
I have been trying to solve this problem(576A(Div1)) since one day. Problem seems bit hard for me. I'm not been able to understand editorial. May anyone will explain this problem in bit more detail. Thanks.
Atcoder ABC #351 Short Solution Discussion