| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 89654 | sh25_zhuhy | 计算多项式的值 | C++ | Accepted | 0 MS | 264 KB | 315 | 2026-06-05 14:41:42 |
#include <bits/stdc++.h> using namespace std; int main() { float x; int n; cin >> x >> n; float sum; if (x == 1) { sum = n + 1; } else { sum = (pow(x, n+1) - 1) / (x - 1); } cout << fixed << setprecision(2) << sum << endl; return 0; }