Files
mruby-mruby/benchmark/fib39.rb
T
2013-04-01 09:46:18 +09:00

9 lines
80 B
Ruby
Executable File

# Fib 39
def fib n
return n if n < 2
fib(n-2) + fib(n-1)
end
puts fib(39)