def fib(n): t = [0] * n t[1] = 1 for i in range(2,n): t[i] = t[i-1] + t[i-2] return t