Each case contains a number n and you are expected to calculate Fn.(0<=n<=30) 。
For each case, print a number Fn on a separate line,which means the nth Fibonacci Number.
1
1
def fib(): yield 0 yield 1 a, b = 0, 1 while 1: a, b = b, a + b yield b try: while 1: gen = fib() for i in xrange(input() + 1): current = next(gen) print current except: pass