eval.in

Paste #178

Ruby — MRI 1.9.3, pasted 4 years ago

1
2
3
4
5
6
7
def fib(n)
  a, b = 0, 1
  n.times { a, b = b + a, a }
  a
end

puts fib 30

Program Output

832040

OK (0.016 sec real, 0.018 sec wall, 7 MB, 22 syscalls)

Fork