結果

問題 No.379 五円硬貨
ユーザー samplelpmassamplelpmas
提出日時 2017-01-03 10:20:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 452 bytes
コンパイル時間 2,339 ms
コンパイル使用メモリ 71,512 KB
実行使用メモリ 56,432 KB
最終ジャッジ日時 2023-08-22 10:12:50
合計ジャッジ時間 5,680 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,864 KB
testcase_01 AC 122 ms
54,304 KB
testcase_02 AC 123 ms
56,228 KB
testcase_03 AC 122 ms
56,432 KB
testcase_04 AC 121 ms
55,796 KB
testcase_05 AC 122 ms
56,400 KB
testcase_06 AC 123 ms
56,124 KB
testcase_07 AC 122 ms
56,176 KB
testcase_08 AC 122 ms
55,700 KB
testcase_09 AC 125 ms
56,224 KB
testcase_10 AC 124 ms
55,888 KB
testcase_11 AC 121 ms
56,240 KB
testcase_12 AC 121 ms
56,340 KB
testcase_13 AC 121 ms
56,032 KB
testcase_14 AC 122 ms
55,984 KB
testcase_15 AC 122 ms
56,252 KB
testcase_16 AC 124 ms
56,004 KB
testcase_17 AC 120 ms
55,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int YEN = sc.nextInt();
        int GAS = sc.nextInt();
        int VOLUME = sc.nextInt();

        int fiveYenCoins = YEN / 5;
        long sumGas = (long) fiveYenCoins * GAS;
        double concentrationGas = (double) sumGas / VOLUME;

        System.out.printf("%.11f\n", concentrationGas);

    }

}
0