Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
9-liner: Feed Pigeons the right way! solution in Clear category for Feed Pigeons by Stensen
def checkio(N):
count, answer = 0, []
while sum(answer if answer else [0]) < N:
count += 1
answer.extend([0]*count)
for i in range(len(answer)):
if sum(answer) < N: answer[i] += 1
else: break
return len(list(filter(None, answer)))
Nov. 8, 2020
Comments: