Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Feed Pigeons by vnkvstnk
def checkio(food):
pigeons = 1
t = 1
while True:
food -= pigeons
t += 1
if food < pigeons:
return pigeons
elif (food - pigeons) < t:
return food
else:
pigeons += t
June 4, 2019
Comments: