結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー ルッツファン
提出日時 2015-11-28 05:42:21
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 1,041 bytes
コンパイル時間 3,347 ms
コンパイル使用メモリ 75,516 KB
実行使用メモリ 54,156 KB
最終ジャッジ日時 2024-09-14 04:35:45
合計ジャッジ時間 8,021 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;

public class yukicoder012 {
	public static void main(String[] args){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String tes = null;

			try {
				tes = br.readLine();
			} catch (IOException e) {
				// TODO 自動生成された catch ブロック
				e.printStackTrace();
			}
			BigDecimal one = new BigDecimal("0.00");
			BigDecimal two = null;
			long r = Long.parseLong(tes);
			double d = 0d;
			double tmp = 0d;
			for(int i=0;i<r;i++){
				
				try {
					tes = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				//tmp = Double.parseDouble(tes);
				two = new BigDecimal(tes);
				//d = tmp + d;
				one = one.add(two);
				//System.out.println(one.doubleValue());
			}
			d = one.doubleValue();
			String s = String.format("%.10f",d);
			System.out.println(s);
			
	}

}
0