| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 162174 | 王翊金恩 | 22第n项的数 | C++ | Accepted | 1 MS | 272 KB | 279 | 2026-10-16 19:04:22 |
#include<bits/stdc++.h> using namespace std; int main() { int n,x1,x2,x3,x4,sum; cin>>n>>x1>>x2>>x3>>x4; if(x2-x1==x4-x3) { cout<<x1+(x2-x1)*(n-1); } else { sum=x1; for(int i=1;i<=n-1;i++) { sum=sum*(x2/x1); } cout<<sum; } return 0; }