fker's blog

By fker, history, 5 months ago, In English

327B - Hungry Sequence

just guess that I can generate a wierd array with the bad numbers like 171.

so I construct this formula: x = (i+17)*71+177171 then it is accepted..

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

»
5 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I prefer learning Sieve of Erathostenes for this question.

»
5 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

You can refer to this — the Sieve of Eratosthenes is a very efficient way to handle such problems.

Sieve of Eratosthenes