結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー kano_townkano_town
提出日時 2014-12-08 23:34:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 463 bytes
コンパイル時間 3,368 ms
コンパイル使用メモリ 74,164 KB
実行使用メモリ 40,412 KB
最終ジャッジ日時 2023-09-29 22:27:50
合計ジャッジ時間 8,332 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
39,612 KB
testcase_01 AC 122 ms
39,808 KB
testcase_02 AC 122 ms
39,744 KB
testcase_03 AC 121 ms
39,912 KB
testcase_04 AC 128 ms
40,212 KB
testcase_05 AC 128 ms
40,204 KB
testcase_06 AC 131 ms
40,412 KB
testcase_07 AC 130 ms
40,004 KB
testcase_08 AC 131 ms
39,656 KB
testcase_09 AC 134 ms
40,096 KB
testcase_10 AC 122 ms
39,788 KB
testcase_11 AC 126 ms
40,188 KB
testcase_12 AC 125 ms
40,116 KB
testcase_13 AC 120 ms
40,120 KB
testcase_14 AC 123 ms
39,824 KB
testcase_15 AC 129 ms
39,640 KB
testcase_16 AC 121 ms
40,104 KB
testcase_17 AC 120 ms
39,712 KB
testcase_18 AC 127 ms
40,100 KB
testcase_19 AC 125 ms
39,716 KB
testcase_20 AC 122 ms
39,504 KB
testcase_21 AC 121 ms
39,828 KB
testcase_22 AC 124 ms
39,816 KB
testcase_23 AC 128 ms
39,856 KB
testcase_24 AC 126 ms
39,552 KB
testcase_25 AC 120 ms
39,732 KB
testcase_26 AC 121 ms
39,484 KB
testcase_27 AC 120 ms
39,856 KB
testcase_28 AC 120 ms
39,376 KB
testcase_29 AC 127 ms
39,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.Scanner;

public class Yukicoder81 {

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