結果

問題 No.8072 Sum of sqrt(x)
ユーザー hgoto
提出日時 2020-10-28 20:52:14
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
OLE  
実行時間 -
コード長 324 bytes
コンパイル時間 2,096 ms
コンパイル使用メモリ 194,560 KB
最終ジャッジ日時 2025-01-15 16:17:27
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 OLE * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  long double ans = 0;
  cout << fixed << setprecision(17);
  while (n--) {
    string s;
    cin >> s;
    long double x = stold(s);
    ans += sqrt(x);
    cout << ans << '\n';
  }
  return 0;
}
0