Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Recursion solution in Clear category for Feed Pigeons by caynan
def checkio(n, pigeon = 1, last = 0):
if n <= last:
return last
if n <= pigeon:
return n
return checkio(n - pigeon, 2 * pigeon - last + 1, pigeon)
March 29, 2015
Comments: