Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
84523 | 胡海峰老师 | 22第n项的数 | Python3 | Accepted | 39 MS | 3780 KB | 297 | 2024-07-16 09:52:04 |
n = int(input()) a,b,c,d = list(map(int,input().split())) flag =0 if b-a == c-b == d-c: flag = 1 if flag ==0:#等比数列 t = b/a res = a for i in range(n-1): res *= t else: t = b-a res = a for i in range(n-1): res += t print(int(res))