deffibonacci(n):if n==1or n==2:return1else:
a=b=1for i inrange(3,n+1):
a,b=b,a+b
return b
import sys
for read_in in sys.stdin:
n=int(read_in.rstrip())print(fibonacci(n))
28.Fibonacci数列http://acm.fzu.edu.cn/problem.php?pid=1060动态规划填表的方式最快def fibonacci(n): if n==1 or n==2: return 1 else: a=b=1 for i in range(3,n+1): a,b=b,a...