godmodegod's blog

By godmodegod, history, 6 hours ago, In English

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?

  • Vote: I like it
  • +1
  • Vote: I do not like it