Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Feed Pigeons by AdamToth
def checkio(wheat):
birds_fed = 0
birds = 0
minute = 1
while wheat:
birds += minute
fed = min(birds, wheat)
birds_fed = max(birds_fed, fed)
wheat -= fed
minute += 1;
return birds_fed
March 5, 2015