結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー HAHAHAHAHAHA
提出日時 2014-12-13 09:35:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 343 bytes
コンパイル時間 1,870 ms
コンパイル使用メモリ 72,136 KB
実行使用メモリ 40,328 KB
最終ジャッジ日時 2023-09-29 22:28:14
合計ジャッジ時間 7,039 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
40,328 KB
testcase_01 AC 107 ms
39,432 KB
testcase_02 AC 114 ms
40,096 KB
testcase_03 AC 108 ms
39,624 KB
testcase_04 AC 113 ms
39,584 KB
testcase_05 AC 113 ms
39,284 KB
testcase_06 AC 118 ms
39,740 KB
testcase_07 AC 117 ms
39,700 KB
testcase_08 AC 119 ms
39,572 KB
testcase_09 AC 120 ms
39,772 KB
testcase_10 AC 106 ms
39,540 KB
testcase_11 AC 111 ms
39,740 KB
testcase_12 AC 114 ms
39,916 KB
testcase_13 AC 111 ms
39,524 KB
testcase_14 AC 114 ms
39,708 KB
testcase_15 AC 116 ms
39,556 KB
testcase_16 AC 110 ms
39,432 KB
testcase_17 AC 110 ms
40,044 KB
testcase_18 AC 114 ms
39,660 KB
testcase_19 AC 115 ms
39,364 KB
testcase_20 AC 111 ms
39,776 KB
testcase_21 AC 108 ms
39,216 KB
testcase_22 AC 112 ms
39,396 KB
testcase_23 AC 115 ms
39,552 KB
testcase_24 AC 114 ms
40,096 KB
testcase_25 AC 107 ms
39,528 KB
testcase_26 AC 117 ms
39,740 KB
testcase_27 AC 115 ms
39,680 KB
testcase_28 AC 108 ms
39,668 KB
testcase_29 AC 112 ms
39,284 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