結果

問題 No.8072 Sum of sqrt(x)
ユーザー trineutron
提出日時 2020-06-11 15:36:47
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1,600 ms / 2,000 ms
コード長 281 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 29,824 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-24 02:01:07
合計ジャッジ時間 149,979 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <math.h>

int main() {
    int n;
    scanf("%d", &n);
    __float128 s = 0;
    for (int i = 0; i < n; i++) {
        long double x;
        scanf("%llf", &x);
        x = sqrtl(x);
        s += x;
        printf("%.17llg\n", (long double) s);
    }
}
0