1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import sys n = int(sys.stdin.readline().rstrip()) dp = [[0] * 41 for _ in range(2)] dp[0][0] = 1 dp[1][1] = 1 for i in range(2, 41): dp[0][i] = dp[0][i – 2] + dp[0][i – 1] dp[1][i] = dp[1][i – 2] + dp[1][i – 1] for _ in range(n): k = int(sys.stdin.readline().rstrip()) print(dp[0][k], dp[1][k]) | cs |