Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
pigeons & newbies solution in Clear category for Feed Pigeons by b-612
def checkio(n):
pigeons, eat, newbies = 0, 0, 1
while newbies:
eat += pigeons + newbies
if n <= eat:
return pigeons if n <= eat - newbies else pigeons + newbies + n - eat
pigeons += newbies
newbies += 1
Feb. 8, 2015