pull down to refresh
Ah yes, how about this:
optimal_move = if N ≤ 2: invalidif N ≤ 4: N-1if N mod 4 ∈ {1,3}: 2if N mod 4 ∈ {0,2}: 3
Ah yes, how about this:
optimal_move = if N ≤ 2: invalid
if N ≤ 4: N-1
if N mod 4 ∈ {1,3}: 2
if N mod 4 ∈ {0,2}: 3