looool's blog

By looool, 12 years ago, In English
can someone explain how to do this problem http://codeforces.com/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

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