Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
92542 只因你太美(Ikun 真爱粉) 22第n项的数 C++ Wrong Answer 1 MS 276 KB 589 2024-10-05 16:54:28

Tests(4/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(){ double a,b,c,d; int n; cin>>n; cin>>a>>b>>c>>d; if(b-a==c-b&&b-a==d-c){ if(c-b!=0){ cout<<a+(n-1)*(b-a); return 0; } else{ cout<<a; return 0; } } if(b/a==c/b&&b/a==d/c){ cout<<a*pow(b/a*1.0,n-1); } return 0; }


Run Info:

------Input------
10 1 5 25 125
------Answer-----
1953125
------Your output-----
1.95312e+06