Skip to content

Commit

Permalink
Update sequence.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan committed Dec 18, 2024
1 parent 4f75ac3 commit 274a640
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions kyu_6/no_arithmetic_progressions/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,11 @@ def sequence(n: int) -> int:
form an arithmetic progression.
Example:
f(0) = 0 -- smallest non-negative
f(1) = 1 -- smallest non-negative, which is not yet in the sequence
f(2) = 3 -- since 0, 1, 2 form an arithmetic progression
f(3) = 4 -- neither of 0, 1, 4, 0, 3, 4, 1, 3, 4 form an arithmetic
progression, so we can take smallest non-negative, which is larger than 3
f(4) = 9 -- 5, 6, 7, 8 are not good, since 1, 3, 5, 0, 3, 6, 1, 4, 7, 0, 4, 8
are all valid arithmetic progressions.
Expand Down

0 comments on commit 274a640

Please sign in to comment.