Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
86838 | 蔡胤泽 | 22第n项的数 | Python3 | Accepted | 38 MS | 3780 KB | 245 | 2024-07-28 14:47:54 |
n = int(input()) list1 = list(map(int, input().split())) a = list1[0] b = list1[1] c = list1[2] d = list1[3] if b - a == d - c: d1 = b - a print(a + d1*(n - 1)) if b / a == d / c: q = d / c print(int(a * q**(n - 1)))