Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Feed Pigeons by blaxmi
from itertools import accumulate, count
def checkio(remaining_wheat):
fed_pigeons = 0
for pigeons in accumulate(count(1)):
if remaining_wheat < pigeons:
return max(remaining_wheat, fed_pigeons)
remaining_wheat -= pigeons
fed_pigeons = pigeons
March 17, 2014
Comments: