結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー 37zigen37zigen
提出日時 2020-03-22 05:04:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 690 bytes
コンパイル時間 2,227 ms
コンパイル使用メモリ 72,956 KB
実行使用メモリ 58,268 KB
最終ジャッジ日時 2023-09-29 22:51:01
合計ジャッジ時間 6,907 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,736 KB
testcase_01 AC 121 ms
56,104 KB
testcase_02 AC 122 ms
54,244 KB
testcase_03 AC 121 ms
56,388 KB
testcase_04 AC 127 ms
56,008 KB
testcase_05 AC 128 ms
55,700 KB
testcase_06 AC 128 ms
55,968 KB
testcase_07 AC 127 ms
56,240 KB
testcase_08 AC 127 ms
56,312 KB
testcase_09 AC 131 ms
56,008 KB
testcase_10 AC 120 ms
56,140 KB
testcase_11 AC 126 ms
54,032 KB
testcase_12 AC 134 ms
56,052 KB
testcase_13 AC 129 ms
56,380 KB
testcase_14 AC 129 ms
56,396 KB
testcase_15 AC 132 ms
56,136 KB
testcase_16 AC 119 ms
55,896 KB
testcase_17 AC 119 ms
58,268 KB
testcase_18 AC 125 ms
56,104 KB
testcase_19 AC 124 ms
56,080 KB
testcase_20 AC 119 ms
55,996 KB
testcase_21 AC 123 ms
56,124 KB
testcase_22 AC 122 ms
56,632 KB
testcase_23 AC 128 ms
55,972 KB
testcase_24 AC 127 ms
56,584 KB
testcase_25 AC 120 ms
56,112 KB
testcase_26 AC 121 ms
55,884 KB
testcase_27 AC 122 ms
55,876 KB
testcase_28 AC 123 ms
56,048 KB
testcase_29 AC 127 ms
56,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.FileNotFoundException;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {
		long t = System.currentTimeMillis();
		new Main().run();
		System.err.println(System.currentTimeMillis() - t);
	}
	
	
	
	void run() {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt();
		BigDecimal ret=new BigDecimal(0);
		for(int i=0;i<N;++i) {
			BigDecimal a=new BigDecimal(sc.next());
			ret=ret.add(a);
		}
		System.out.println(ret.setScale(10).toPlainString());
	}


	static void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}

}
0