結果

問題 No.8072 Sum of sqrt(x)
ユーザー trineutron
提出日時 2020-06-05 19:00:33
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 364 bytes
コンパイル時間 5,264 ms
コンパイル使用メモリ 87,920 KB
最終ジャッジ日時 2025-01-10 21:48:02
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13 WA * 12 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <cmath>

int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    std::cout << std::setprecision(17);
    int n;
    std::cin >> n;
    long double s = 0;
    for (int i = 0; i < n; i++) {
        long x;
        std::cin >> x;
        s += sqrtl(x);
        std::cout << s << "\n";
    }
}
0