Блог пользователя godmodegod

Автор godmodegod, история, 6 часов назад, По-английски

Here's my attempt at solving the problem 1829G

I've started from the bottom nth row and worked my way up from there. The set considered has all the values that have already been taken before. This solution fails for the sample test case when n = 1434( gives 80385350, should give 63145186)

Code

Where am I messing up here?

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится