結果
| 問題 | No.8072 Sum of sqrt(x) |
| ユーザー |
|
| 提出日時 | 2023-10-27 20:01:08 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
OLE
|
| 実行時間 | - |
| コード長 | 324 bytes |
| 記録 | |
| コンパイル時間 | 1,493 ms |
| コンパイル使用メモリ | 209,064 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-02 20:37:13 |
| 合計ジャッジ時間 | 55,249 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 OLE * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ld = long double;
int main() {
ios::sync_with_stdio(0);
int n; cin >> n;
ld sum = 0, c = 0;
while(n --) {
ld x; cin >> x;
x = sqrt(x);
x = x + c;
ld t = sum + x;
c = t - sum - x;
sum = t;
cout << fixed << setprecision(18) << sum << '\n';
}
}