- 1
- 2
- 3
- 4
- 5
- 6
- 7
def checkio(opacity):
c = lambda a,m:c(a+[a[-2]+a[-1]],m)if a[-1]<=m else a
fib = set(c([1,1],5000))
l = list(range(10000,0,-1))
for x in range(1,10000):
l[x] = l[x-1] - x if x in fib else l[x-1]+1
return l.index(opacity)
3_14dar 16.09.2015 03:42 # 0
gost 16.09.2015 11:36 # 0
3_14dar 16.09.2015 14:34 # 0
gost 16.09.2015 17:20 # 0
roman-kashitsyn 16.09.2015 17:33 # +1
bormand 16.09.2015 19:20 # +1