MokaMoka's blog

By MokaMoka, history, 9 years ago, In English

Any hints to solve this problem ?

http://a2oj.com/p.jsp?ID=11

I tried to get the least common multiple (lcm) of the increasing factors of these two sequences but there was a bug which is that the starting points are not always equal

Any help please?

  • Vote: I like it
  • -2
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +1 Vote: I do not like it

If you've found the LCM of the increasing factors and the first number x which is in both sequences, then find the maximum terms of each sequence m1 and m2. The answer is 1 + (min(m1, m2) — x)/LCM.