Problem 25
なんかカッコいい解き方があるみたいだけど,
lis = [1,1] while len(str(lis[-1])) < 1000: lis.append(lis[-1] + lis[-2]) print len(lis)
シンプル・イズ・ベスト.というかそこら辺なものか?w
from math import ceil,log,sqrt print ceil((1000 - 1 + log(sqrt(5),10)) / log((1 + sqrt(5)) / 2.0, 10))
カッコいい答え.