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

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(){ int n,a[4],i; cin>>n; for(i=1;i<=4;i++){ cin>>a[i]; } if(a[2]-a[1]!=a[3]-a[2]){ cout<<a[1]*pow(a[2]/a[1]*1.0,n-1); } else{ cout<<a[1]+(a[2]-a[1])*(n-1); } return 0; }


Run Info:

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