# # # # # # # # # # /37/euler-025.rb # # by Jan Lelis # e-mail: mail@janlelis.de # type/version: ruby # snippet url: http://rbJL.net/37/euler-025.rb # original post: http://rbJL.net/37-project-euler-19-20-21-22-23-24-25-ruby # license: CC-BY (DE) # # (c) 2010 Jan Lelis. # http://projecteuler.net/index.php?section=problems&id=25 # fibonacci again ;) MAX = 10**999 # the next number has 1000 digits fib = [1,1] # the first two digits are given i = 0 while fib[-1] < MAX fib << fib[i] + fib[i+=1] end puts fib.size