結果
| 問題 |
No.81 すべて足すだけの簡単なお仕事です。
|
| コンテスト | |
| ユーザー |
holeguma
|
| 提出日時 | 2015-08-14 15:22:46 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 153 ms / 5,000 ms |
| コード長 | 536 bytes |
| コンパイル時間 | 2,463 ms |
| コンパイル使用メモリ | 76,032 KB |
| 実行使用メモリ | 54,816 KB |
| 最終ジャッジ日時 | 2024-07-22 16:30:33 |
| 合計ジャッジ時間 | 8,021 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
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();
}
}
}
holeguma