結果

問題 No.32 貯金箱の憂鬱
ユーザー Pump0129Pump0129
提出日時 2018-03-26 23:21:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 554 bytes
コンパイル時間 2,465 ms
コンパイル使用メモリ 72,168 KB
実行使用メモリ 56,292 KB
最終ジャッジ日時 2023-09-30 13:07:36
合計ジャッジ時間 4,875 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
56,284 KB
testcase_01 AC 116 ms
55,768 KB
testcase_02 AC 116 ms
56,064 KB
testcase_03 AC 116 ms
55,764 KB
testcase_04 AC 118 ms
56,080 KB
testcase_05 AC 118 ms
55,688 KB
testcase_06 AC 116 ms
55,764 KB
testcase_07 AC 115 ms
56,292 KB
testcase_08 AC 116 ms
55,800 KB
testcase_09 AC 120 ms
55,512 KB
testcase_10 AC 117 ms
55,868 KB
testcase_11 AC 116 ms
55,764 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/4;
        yen25 %= 4;
        yen100 %= 10;

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