Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
opacity+reduced solution in Clear category for Ghosts Age by akaka
import math
MAX_AGE=5000
def is_fibonacci(number):
return (math.sqrt(5*(number**2)+4).is_integer() or
math.sqrt(5*(number**2)-4).is_integer())
def checkio(opacity):
reduced = []
for age in range(MAX_AGE):
reduced.append(age if is_fibonacci(age) else -1)
if opacity+sum(reduced) == 10000: return age
Oct. 20, 2018