| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158917 | 张蔚林 | 22第n项的数 | C++ | Wrong Answer | 1 MS | 284 KB | 261 | 2026-08-23 13:28:58 |
#include<bits/stdc++.h> using namespace std; int main() { int n,s[10001]; cin>>n; for(int i=0;i<4;i++){ cin>>s[i]; } int d=s[1]-s[0]; if((s[2]-s[n])==d){ cout<<s[0]+(n-1)*d; } else { cout<<s[0]*pow(s[2]/s[1],n-1); } return 0; }
------Input------
6 1 6 11 16
------Answer-----
26
------Your output-----
1