Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
93618 | 小徐老师 | 22第n项的数 | C++ | Wrong Answer | 1 MS | 280 KB | 317 | 2024-10-18 17:59:29 |
#include <bits/stdc++.h> using namespace std; int main() { int L,a1,a2,a3,a4,w, W; cin >> L; cin >> a1 >> a2 >> a3 >> a4; w = a3 - a2; W = a3 / a2; if(a1+w==a2&&a2+w==a3&&a3+w==a4) cout<<a1 + w * (L - 1); else cout << a1 * pow(W, L - 1); return 0; }
------Input------
10 1 5 25 125
------Answer-----
1953125
------Your output-----
1.95312e+06