eval.in

Paste #180

Python — CPython 2.7.3, pasted 4 years ago

1
2
3
4
5
6
7
def fib(n):
  a, b = 0, 1
  for i in xrange(n):
    a, b = b + a, a
  return a

print fib(30)

Program Output

832040

OK (0.024 sec real, 0.022 sec wall, 5 MB, 31 syscalls)

Fork