Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
85611 丁俊杰 22第n项的数 Python3 Accepted 37 MS 3780 KB 182 2024-07-18 22:59:07

Tests(5/5):


Code:

n=int(input()) a,b,c,d=input().split() a,b,c,d=int(a),int(b),int(c),int(d) if d-c==c-b==b-a: print(a+(n-1)*(b-a)) if d//c==c//b==b//a: s=(b//a)**(n-1) print(a*s)