Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Feed Pigeons by Riddick
def checkio(N):
minute = 0
pigeons = 0
fed_pigeons = 0
while N > pigeons:
minute += 1
pigeons += minute
N -= pigeons
fed_pigeons = pigeons
if N <= 0:
return fed_pigeons + N
else:
return fed_pigeons
Jan. 21, 2015