| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 130740 | 郝王骏程 | 22第n项的数 | C++ | Accepted | 1 MS | 268 KB | 547 | 2025-09-15 20:02:22 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a,b,c,d,e,x=1,i; cin>>e>>a>>b>>c>>d; if(b-a==c-b){ for(i=a;x<=e-1;x++) { i+=b-a; } cout<<i; } else{ if(b/a==c/b){ for(i=a;x<=e-1;x++) { i*=b/a; } cout<<i; } } return 0; }