| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158912 | 李沐阳 | 22第n项的数 | C++ | Wrong Answer | 1 MS | 280 KB | 232 | 2026-08-23 13:25:59 |
#include<bits/stdc++.h> using namespace std; int main(){ int a[100]={},n; cin>>n; for(int i=0;i<4;i++) cin>>a[i]; int c=a[1]-a[0]; if(a[2]-a[1]==c) cout<<a[0]+(n-1)*c; else cout<<a[0]*pow(a[1]/a[0],n-1); return 0; }
------Input------
10 1 5 25 125
------Answer-----
1953125
------Your output-----
1.95312e+06