Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Feed Pigeons by fed.kz
def checkio(food):
count = 1
res = [0]
while 1:
for index in range(len(res)):
res[index] += 1
food -= 1
if not food: return len(res) - res.count(0)
count += 1
res += [0]*count
Oct. 13, 2018