結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー htensai
提出日時 2019-12-26 18:07:23
言語 Java
(openjdk 23)
結果
AC  
実行時間 156 ms / 5,000 ms
コード長 464 bytes
コンパイル時間 2,396 ms
コンパイル使用メモリ 75,776 KB
実行使用メモリ 54,664 KB
最終ジャッジ日時 2024-07-22 16:48:16
合計ジャッジ時間 8,411 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        BigDecimal ans = BigDecimal.ZERO;
        for (int i = 0; i < n; i++) {
            ans = ans.add(new BigDecimal(sc.next()));
        }
        java.text.DecimalFormat df = new java.text.DecimalFormat("#0.0000000000");
        System.out.println(df.format(ans));
    }
    
}
0