Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First - Feed Pigeons solution in Clear category for Feed Pigeons by AQiccl135
def checkio(food):
fed = 0
newBirds = 1
flock = 0
while newBirds < 180:
if food >= flock:
food -= flock
else:
break
if food >= newBirds:
food -= newBirds
fed += newBirds
elif 0 < food < newBirds:
fed += food
else:
break
flock += newBirds
newBirds += 1
return fed
Oct. 7, 2014
Comments: