Skipping around a bit, I saw that #25 looked pretty easy. It was. I saw in the forums that someone had used binary search and a calculator which I thought was pretty clever, but mine was just brute force.
What is the first term in the Fibonacci sequence to contain 1000 digits?
Solution
max = 10 ** 999 a, b, i = 1, 1, 2 while b < max i += 1 a, b = b, b + a end puts i
Tags: project euler, ruby
[...] ran this and #25 through ruby 1.8.6 and 1.9.1 and was suprised to see that it ran much slower in the newer version. [...]
I just needed to say that I found your site via Goolge and I am glad I did. Keep up the good work and I will make sure to bookmark you for when I have more free time away from the books. Thanks again!