Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
119767 刘珩宇 22第n项的数 C++ Wrong Answer 1 MS 268 KB 541 2025-05-18 18:51:51

Tests(0/5):


Code:

#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 p,e,i,d,a,x,y,z; cin>>a>>p>>e>>i>>d; if(d/i==i/e&&i/e==e/p&&d/i==e/p){ x=d/i; for(y=d;y<a;y++){ d*=x; } cout<<d; return 0; } if(d-i==i-e&&i-e==e-p&&d-i==e-p){ x=d-i; for(y=d;y<a;y++){ d+=x; } cout<<d; } return 0; }


Run Info:

------Input------
6 1 6 11 16
------Answer-----
26
------Your output-----
16