結果

問題 No.3072 Sum of sqrt(x)
ユーザー trineutrontrineutron
提出日時 2020-06-05 18:38:27
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 1,523 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 1,608 ms
コンパイル使用メモリ 49,048 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-16 09:48:47
合計ジャッジ時間 146,323 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 4 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,500 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1,337 ms
4,376 KB
testcase_08 AC 484 ms
4,376 KB
testcase_09 AC 716 ms
4,380 KB
testcase_10 AC 1,489 ms
4,380 KB
testcase_11 AC 1,484 ms
4,380 KB
testcase_12 AC 1,506 ms
4,384 KB
testcase_13 AC 1,487 ms
4,380 KB
testcase_14 AC 1,457 ms
4,384 KB
testcase_15 AC 1,445 ms
4,380 KB
testcase_16 AC 1,452 ms
4,392 KB
testcase_17 AC 1,469 ms
4,392 KB
testcase_18 AC 1,438 ms
4,396 KB
testcase_19 AC 1,438 ms
4,396 KB
testcase_20 AC 1,449 ms
4,388 KB
testcase_21 AC 1,459 ms
4,392 KB
testcase_22 AC 1,447 ms
4,392 KB
testcase_23 AC 1,444 ms
4,392 KB
testcase_24 AC 1,441 ms
4,392 KB
testcase_25 AC 1,523 ms
4,392 KB
testcase_26 AC 1,442 ms
4,388 KB
testcase_27 AC 1,371 ms
4,396 KB
testcase_28 AC 1,390 ms
4,392 KB
testcase_29 AC 1,407 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cmath>

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