結果

問題 No.3072 Sum of sqrt(x)
ユーザー trineutrontrineutron
提出日時 2020-06-07 18:51:26
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 1,404 ms / 2,000 ms
コード長 307 bytes
コンパイル時間 1,188 ms
コンパイル使用メモリ 49,780 KB
実行使用メモリ 10,832 KB
最終ジャッジ日時 2023-09-16 10:06:49
合計ジャッジ時間 139,390 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,988 KB
testcase_01 AC 1 ms
4,992 KB
testcase_02 AC 2 ms
4,996 KB
testcase_03 AC 1 ms
4,996 KB
testcase_04 AC 1 ms
5,056 KB
testcase_05 AC 1 ms
4,996 KB
testcase_06 AC 1 ms
4,992 KB
testcase_07 AC 1,273 ms
10,816 KB
testcase_08 AC 452 ms
10,788 KB
testcase_09 AC 637 ms
10,724 KB
testcase_10 AC 1,404 ms
10,752 KB
testcase_11 AC 1,401 ms
10,696 KB
testcase_12 AC 1,389 ms
10,720 KB
testcase_13 AC 1,374 ms
10,808 KB
testcase_14 AC 1,377 ms
10,784 KB
testcase_15 AC 1,378 ms
10,744 KB
testcase_16 AC 1,372 ms
10,816 KB
testcase_17 AC 1,379 ms
10,820 KB
testcase_18 AC 1,382 ms
10,816 KB
testcase_19 AC 1,376 ms
10,744 KB
testcase_20 AC 1,378 ms
10,776 KB
testcase_21 AC 1,376 ms
10,768 KB
testcase_22 AC 1,384 ms
10,752 KB
testcase_23 AC 1,399 ms
10,764 KB
testcase_24 AC 1,376 ms
10,716 KB
testcase_25 AC 1,375 ms
10,728 KB
testcase_26 AC 1,370 ms
10,772 KB
testcase_27 AC 1,293 ms
10,728 KB
testcase_28 AC 1,313 ms
10,832 KB
testcase_29 AC 1,321 ms
10,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cmath>

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