Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Ghosts Age by PawlakBartosz43
def fib_to(n):
fibs = [1, 1]
for i in range(2, n + 1):
fibs.append(fibs[-1] + fibs[-2])
return fibs
def checkio(opacity):
age = 0
opacity_left = 10000
fib_numbers = fib_to(20)
while opacity != opacity_left:
age += 1
if age in fib_numbers:
opacity_left -= age
else:
opacity_left += 1
return age
Jan. 15, 2017