結果

問題 No.379 五円硬貨
ユーザー atkrym
提出日時 2016-10-22 17:55:22
言語 Java
(openjdk 23)
結果
AC  
実行時間 152 ms / 1,000 ms
コード長 513 bytes
コンパイル時間 2,308 ms
コンパイル使用メモリ 74,920 KB
実行使用メモリ 41,756 KB
最終ジャッジ日時 2024-11-23 17:16:20
合計ジャッジ時間 5,740 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        BigDecimal n = new BigDecimal(sc.nextInt());
        BigDecimal c = new BigDecimal(sc.nextInt());
        BigDecimal v = new BigDecimal(sc.nextInt());

        BigDecimal num = n.divide(new BigDecimal(5), 0, RoundingMode.DOWN);
        
        System.out.println(num.multiply(c).divide(v, 12, RoundingMode.HALF_UP));
    }
}
0