結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー rf141rf141
提出日時 2015-06-28 23:08:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 389 bytes
コンパイル時間 2,540 ms
コンパイル使用メモリ 71,472 KB
実行使用メモリ 56,620 KB
最終ジャッジ日時 2023-09-29 22:30:09
合計ジャッジ時間 7,183 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
56,036 KB
testcase_01 AC 127 ms
56,048 KB
testcase_02 AC 130 ms
56,376 KB
testcase_03 AC 126 ms
55,752 KB
testcase_04 AC 135 ms
56,500 KB
testcase_05 AC 132 ms
55,932 KB
testcase_06 AC 135 ms
55,948 KB
testcase_07 AC 134 ms
55,696 KB
testcase_08 AC 135 ms
56,620 KB
testcase_09 AC 139 ms
56,412 KB
testcase_10 AC 125 ms
55,692 KB
testcase_11 AC 131 ms
56,188 KB
testcase_12 AC 130 ms
55,920 KB
testcase_13 AC 124 ms
55,700 KB
testcase_14 AC 131 ms
56,052 KB
testcase_15 AC 138 ms
56,416 KB
testcase_16 AC 128 ms
56,324 KB
testcase_17 AC 128 ms
56,008 KB
testcase_18 AC 135 ms
56,260 KB
testcase_19 AC 131 ms
55,924 KB
testcase_20 AC 127 ms
56,176 KB
testcase_21 AC 129 ms
55,940 KB
testcase_22 AC 129 ms
56,108 KB
testcase_23 AC 134 ms
56,176 KB
testcase_24 AC 132 ms
56,092 KB
testcase_25 AC 125 ms
55,952 KB
testcase_26 AC 125 ms
55,740 KB
testcase_27 AC 126 ms
56,016 KB
testcase_28 AC 127 ms
56,084 KB
testcase_29 AC 135 ms
56,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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