結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー holegumaholeguma
提出日時 2015-08-14 15:22:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 536 bytes
コンパイル時間 3,076 ms
コンパイル使用メモリ 72,708 KB
実行使用メモリ 56,080 KB
最終ジャッジ日時 2023-09-29 22:31:02
合計ジャッジ時間 7,531 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,904 KB
testcase_01 AC 119 ms
55,540 KB
testcase_02 AC 117 ms
55,704 KB
testcase_03 AC 118 ms
55,772 KB
testcase_04 AC 119 ms
55,816 KB
testcase_05 AC 120 ms
55,564 KB
testcase_06 AC 121 ms
55,820 KB
testcase_07 AC 120 ms
55,820 KB
testcase_08 AC 121 ms
55,728 KB
testcase_09 AC 122 ms
55,924 KB
testcase_10 AC 118 ms
55,520 KB
testcase_11 AC 118 ms
55,848 KB
testcase_12 AC 118 ms
55,776 KB
testcase_13 AC 118 ms
55,588 KB
testcase_14 AC 116 ms
55,788 KB
testcase_15 AC 120 ms
55,624 KB
testcase_16 AC 118 ms
55,736 KB
testcase_17 AC 120 ms
55,528 KB
testcase_18 AC 118 ms
55,740 KB
testcase_19 AC 118 ms
55,828 KB
testcase_20 AC 117 ms
55,732 KB
testcase_21 AC 118 ms
55,544 KB
testcase_22 AC 122 ms
56,080 KB
testcase_23 AC 120 ms
55,752 KB
testcase_24 AC 121 ms
55,932 KB
testcase_25 AC 119 ms
55,960 KB
testcase_26 AC 118 ms
55,764 KB
testcase_27 AC 119 ms
55,752 KB
testcase_28 AC 121 ms
55,804 KB
testcase_29 AC 121 ms
55,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.math.*;

class Main{

static final PrintWriter out=new PrintWriter(System.out);

public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
BigDecimal x=new BigDecimal("0.0");
while((line=br.readLine())!=null&&!line.isEmpty()){
int n=Integer.parseInt(line);
for(int i=0;i<n;i++){
BigDecimal y=new BigDecimal(br.readLine());
x=x.add(y);
}
x=x.setScale(10,RoundingMode.HALF_UP);
out.printf("%.10f",x);
out.flush();
}
}
}
0