結果

問題 No.32 貯金箱の憂鬱
ユーザー Daigo HIROOKADaigo HIROOKA
提出日時 2018-05-10 04:24:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 532 bytes
コンパイル時間 3,186 ms
コンパイル使用メモリ 72,084 KB
実行使用メモリ 56,120 KB
最終ジャッジ日時 2023-09-30 13:10:52
合計ジャッジ時間 5,545 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,860 KB
testcase_01 AC 126 ms
55,704 KB
testcase_02 AC 126 ms
56,120 KB
testcase_03 AC 125 ms
55,692 KB
testcase_04 AC 127 ms
55,764 KB
testcase_05 AC 125 ms
56,016 KB
testcase_06 AC 127 ms
55,952 KB
testcase_07 AC 125 ms
55,632 KB
testcase_08 AC 126 ms
56,000 KB
testcase_09 AC 126 ms
56,032 KB
testcase_10 AC 126 ms
56,060 KB
testcase_11 AC 127 ms
55,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Chokin{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int R = 0;
        int L = sc.nextInt();
        int M = sc.nextInt();
        int N = sc.nextInt();

        if(N >= 25){
            M += N/25;
            N -= 25*(N/25);
        }
        if(M >= 4){
            L += M/4;
            M -= 4*(M/4);
        }
        if(L >= 10){
            R += L/10;
            L -= 10*(L/10);
        }
        System.out.println(L+M+N);
    }
}
0