結果

問題 No.32 貯金箱の憂鬱
ユーザー Pump0129Pump0129
提出日時 2018-03-26 23:18:23
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 594 bytes
コンパイル時間 1,908 ms
コンパイル使用メモリ 71,468 KB
実行使用メモリ 58,228 KB
最終ジャッジ日時 2023-09-07 18:31:39
合計ジャッジ時間 4,161 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 117 ms
53,940 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 118 ms
55,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package net.ipipip0129.yukicoder.no32;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int yen100 = Integer.parseInt(scan.nextLine());
        int yen25 = Integer.parseInt(scan.nextLine());
        int yen1 = Integer.parseInt(scan.nextLine());

        yen25 += (int) yen1/25;
        yen1 %= 25;
        yen100 += (int) yen25/5;
        yen25 %= 5;
        int yen1000 = (int) yen100/10;
        yen100 %= 10;

        System.out.println(yen1 + yen25 + yen100);
    }
}
0