結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー htensaihtensai
提出日時 2019-12-26 18:07:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 464 bytes
コンパイル時間 2,866 ms
コンパイル使用メモリ 72,144 KB
実行使用メモリ 56,640 KB
最終ジャッジ日時 2023-09-29 22:50:25
合計ジャッジ時間 7,741 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
54,280 KB
testcase_01 AC 125 ms
56,092 KB
testcase_02 AC 114 ms
56,032 KB
testcase_03 AC 116 ms
55,972 KB
testcase_04 AC 118 ms
54,616 KB
testcase_05 AC 122 ms
56,176 KB
testcase_06 AC 126 ms
55,980 KB
testcase_07 AC 119 ms
55,944 KB
testcase_08 AC 128 ms
56,208 KB
testcase_09 AC 132 ms
56,076 KB
testcase_10 AC 118 ms
56,312 KB
testcase_11 AC 124 ms
56,200 KB
testcase_12 AC 123 ms
56,280 KB
testcase_13 AC 119 ms
55,820 KB
testcase_14 AC 114 ms
56,640 KB
testcase_15 AC 126 ms
56,204 KB
testcase_16 AC 121 ms
56,172 KB
testcase_17 AC 121 ms
55,972 KB
testcase_18 AC 126 ms
56,384 KB
testcase_19 AC 120 ms
56,064 KB
testcase_20 AC 118 ms
56,184 KB
testcase_21 AC 124 ms
56,160 KB
testcase_22 AC 123 ms
56,288 KB
testcase_23 AC 128 ms
56,360 KB
testcase_24 AC 123 ms
56,488 KB
testcase_25 AC 118 ms
55,876 KB
testcase_26 AC 113 ms
55,908 KB
testcase_27 AC 114 ms
56,132 KB
testcase_28 AC 118 ms
56,256 KB
testcase_29 AC 120 ms
56,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        BigDecimal ans = BigDecimal.ZERO;
        for (int i = 0; i < n; i++) {
            ans = ans.add(new BigDecimal(sc.next()));
        }
        java.text.DecimalFormat df = new java.text.DecimalFormat("#0.0000000000");
        System.out.println(df.format(ans));
    }
    
}
0