Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98967 徐梓涵 小明养猪的故事 Python3 Wrong Answer 34 MS 3748 KB 239 2024-11-23 20:06:39

Tests(0/1):


Code:

a=int(input()) c=[] for i in range(a): t=int(input()) if t==1 or t==2: c.append(t) else: pig=2 for x2 in range(3,t+1): pig=pig*2-1 c.append(pig) for x in c: print(x)


Run Info:

------Input------
17 1 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
------Answer-----
1 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765
------Your output-----