looool's blog

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

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