Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78965 刘宇轩 22第n项的数 C++ Wrong Answer 0 MS 284 KB 218 2024-06-29 15:46:07

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)==(b-a)){ cout<<a+(v-1)*(b-a); } else if(d/c==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