結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー aa
提出日時 2014-11-27 23:48:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 170 ms / 5,000 ms
コード長 613 bytes
コンパイル時間 2,334 ms
コンパイル使用メモリ 71,800 KB
実行使用メモリ 56,860 KB
最終ジャッジ日時 2023-09-29 22:25:19
合計ジャッジ時間 8,817 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
55,996 KB
testcase_01 AC 137 ms
55,976 KB
testcase_02 AC 137 ms
56,860 KB
testcase_03 AC 136 ms
56,212 KB
testcase_04 AC 167 ms
56,664 KB
testcase_05 AC 147 ms
55,796 KB
testcase_06 AC 155 ms
56,360 KB
testcase_07 AC 156 ms
56,008 KB
testcase_08 AC 160 ms
56,220 KB
testcase_09 AC 170 ms
56,552 KB
testcase_10 AC 136 ms
56,248 KB
testcase_11 AC 147 ms
56,320 KB
testcase_12 AC 146 ms
56,000 KB
testcase_13 AC 137 ms
56,032 KB
testcase_14 AC 138 ms
55,736 KB
testcase_15 AC 155 ms
56,464 KB
testcase_16 AC 136 ms
55,992 KB
testcase_17 AC 135 ms
56,284 KB
testcase_18 AC 152 ms
56,724 KB
testcase_19 AC 143 ms
56,212 KB
testcase_20 AC 135 ms
56,456 KB
testcase_21 AC 136 ms
54,060 KB
testcase_22 AC 142 ms
56,064 KB
testcase_23 AC 156 ms
56,036 KB
testcase_24 AC 146 ms
55,808 KB
testcase_25 AC 136 ms
56,120 KB
testcase_26 AC 133 ms
55,996 KB
testcase_27 AC 138 ms
56,728 KB
testcase_28 AC 135 ms
56,032 KB
testcase_29 AC 146 ms
55,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
 
public class Main {
    //MathContext AA = new MathContext(100, RoundingMode.HALF_UP);
    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        BigDecimal a = new BigDecimal("0"/*,AA*/);
        for( int i = 0; i < n; i++ ) {
            BigDecimal p = sc.nextBigDecimal();
            a = a.add(p);
        }
        //System.out.printf("%.10f\n",a.doubleValue());
        System.out.println(a.setScale(10).toPlainString());
    }
    public static void main(String[] z) {
        new Main().run();
    }
}
0