結果

問題 No.8072 Sum of sqrt(x)
ユーザー ninoinui
提出日時 2020-09-12 21:28:37
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
OLE  
実行時間 -
コード長 359 bytes
コンパイル時間 8,310 ms
コンパイル使用メモリ 367,060 KB
最終ジャッジ日時 2025-01-14 13:47:53
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 OLE * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_dec_float.hpp>
using namespace std;
using bdec = boost::multiprecision::cpp_dec_float_100;

int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  int N;
  cin >> N;
  bdec ans = 0;
  long double x;
  while (cin >> x) cout << fixed << setprecision(20) << (ans += sqrtl(x)) << "\n";
}
0