Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78967 刘宇轩 22第n项的数 C++ Wrong Answer 1 MS 280 KB 242 2024-06-29 15:47:44

Tests(4/5):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ long long v,a,b,c,d; cin>>v>>a>>b>>c>>d; if((d-c)==(c-b)&&(c-b)==(b-a)){ cout<<a+(v-1)*(b-a); } else if(d/c==b/a&&c/b==b/a){ cout<<a*pow(d/c,v-1); } return 0; }


Run Info:

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