結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-18 22:18:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 140 ms / 5,000 ms
コード長 489 bytes
コンパイル時間 2,029 ms
コンパイル使用メモリ 75,844 KB
実行使用メモリ 56,716 KB
最終ジャッジ日時 2023-09-29 22:29:48
合計ジャッジ時間 7,351 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
56,716 KB
testcase_01 AC 128 ms
55,968 KB
testcase_02 AC 129 ms
56,420 KB
testcase_03 AC 128 ms
56,052 KB
testcase_04 AC 135 ms
55,944 KB
testcase_05 AC 134 ms
55,868 KB
testcase_06 AC 137 ms
56,488 KB
testcase_07 AC 137 ms
56,024 KB
testcase_08 AC 135 ms
56,240 KB
testcase_09 AC 140 ms
56,292 KB
testcase_10 AC 127 ms
55,992 KB
testcase_11 AC 133 ms
56,220 KB
testcase_12 AC 133 ms
56,288 KB
testcase_13 AC 127 ms
56,244 KB
testcase_14 AC 130 ms
55,860 KB
testcase_15 AC 137 ms
55,836 KB
testcase_16 AC 129 ms
56,300 KB
testcase_17 AC 129 ms
56,424 KB
testcase_18 AC 138 ms
56,204 KB
testcase_19 AC 132 ms
55,968 KB
testcase_20 AC 131 ms
56,160 KB
testcase_21 AC 130 ms
54,164 KB
testcase_22 AC 134 ms
56,176 KB
testcase_23 AC 138 ms
56,296 KB
testcase_24 AC 137 ms
55,924 KB
testcase_25 AC 129 ms
56,092 KB
testcase_26 AC 130 ms
56,488 KB
testcase_27 AC 130 ms
56,104 KB
testcase_28 AC 129 ms
56,240 KB
testcase_29 AC 133 ms
56,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner koko = new Scanner(System.in);
        int n = koko.nextInt();
        BigDecimal total= new BigDecimal("0.0000000000");
        BigDecimal[] a = new BigDecimal[n];
        for(int i=0; i<n; i++){
            a[i]= new BigDecimal(koko.next());
            total = total.add(a[i]);
        }
        System.out.printf("%.10f",total);
    }
}
0