結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー kou6839
提出日時 2014-12-01 17:30:49
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 361 bytes
コンパイル時間 2,285 ms
コンパイル使用メモリ 74,824 KB
実行使用メモリ 41,788 KB
最終ジャッジ日時 2024-06-11 07:32:54
合計ジャッジ時間 7,697 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 24
権限があれば一括ダウンロードができます

ソースコード

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 a = new BigDecimal("0");
		for(int i=0;i<n;i++){
			String d =sc.next();
			a=a.add(new BigDecimal(d));
		}
		double ans=a.doubleValue();
		System.out.print(a);
	}
}		
0