Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Boo solution in Uncategorized category for Ghosts Age by Juge_Ti
def checkio(op):
f = [
0,1,2,3,5,8,
18-5,7+14,30+4,0+55,
82+7, 48*3,
233, 377,
610, 987,
1597, 2584,
4181, 6765]
l = [ 10000, 9999, 9997, 9994,
9990, 9984, 9975, 9961,
9939, 9904, 9848, 9758,
9613, 9379, 9001, 8390,
7402, 5804,
3219, 8390,
9001, 8390,
9848, 9758,
9613, 22, 22, 22, 9379,
9001, 44, 44, 44, 44, 44, 44, 8390,
9848, 88, 88, 88, 88, 9758,
9613, 9379,
9041, 8390,
9133, 9379,
562,1, 35, 24, 4,752,
52, 12, 21, 13, 75, 38, 42, 84,
3, 53, 64, 36, 1]
i = min(j for j in range(20) if l[j] <= op)
return f[i] + op - l[i]
Oct. 29, 2013
Comments: