Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Feed Pigeons by UFO665
def checkio(number):
result = 0
pigeons = 1
diff = 2
while number > 0:
if pigeons > result:
if number >= pigeons:
result += pigeons - result
elif number >= result:
result += number - result
number -= pigeons
pigeons += diff
diff += 1
return result
Dec. 8, 2015