projects
/
project-euler.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Done puzzle 64
[project-euler.git]
/
euler25.rb
1
load
'fibonacci.rb'
2
3
i
=
100
4
while
i
.
fibonacci
.
to_s
.
length
<
1000
5
i
+=
1
6
end
7
8
puts
"The #{i}th Fibonacci term has #{i.fibonacci.to_s.length} digits"
9
puts
"The previous, #{i-1}th Fibonacci term has #{(i-1).fibonacci.to_s.length} digits"