Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
84525 | 胡海峰老师 | 22第n项的数 | Python3 | Accepted | 42 MS | 3772 KB | 293 | 2024-07-16 09:52:29 |
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(res)