Please read the new rule regarding the restriction on the use of AI tools. ×

looool's blog

By looool, 13 years ago, In English
can someone explain how to do this problem http://codeforces.net/contest/134/problem/B
i used dfs that resulted in TLE, number theory tag is given at hints, but i am not able to understand how to do it ?
  • Vote: I like it
  • +8
  • Vote: I do not like it

»
13 years ago, # |
  Vote: I like it +11 Vote: I do not like it