Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Feed Pigeons by TovarischZhukov
def checkio(num, count=0, i=1, pigeons = 0):
while num > 0:
pigeons+=i
if num >= pigeons:
count = pigeons
num -= pigeons
i += 1
else:
count = max(num, pigeons-i)
break
return count
Dec. 8, 2015