Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
max! solution in Creative category for Feed Pigeons by timiway
def pig(n,p):
if n>p:
return p
return n
def checkio(number):
t=0
p=0
pe=[]
while number>0:
pe.append(pig(number,p))
number-=p
t+=1
p+=t
return max(pe)
#These "asserts" using only for self-checking and not necessary for auto-testing
May 16, 2014