結果

問題 No.32 貯金箱の憂鬱
ユーザー rapurasurapurasu
提出日時 2022-07-17 03:42:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 486 bytes
コンパイル時間 1,973 ms
コンパイル使用メモリ 72,532 KB
実行使用メモリ 56,524 KB
最終ジャッジ日時 2023-09-11 14:33:38
合計ジャッジ時間 4,575 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,980 KB
testcase_01 AC 123 ms
56,116 KB
testcase_02 AC 123 ms
56,396 KB
testcase_03 AC 123 ms
56,136 KB
testcase_04 AC 121 ms
56,492 KB
testcase_05 AC 122 ms
56,168 KB
testcase_06 AC 121 ms
56,004 KB
testcase_07 AC 122 ms
56,364 KB
testcase_08 AC 122 ms
56,380 KB
testcase_09 AC 123 ms
56,524 KB
testcase_10 AC 123 ms
56,300 KB
testcase_11 AC 123 ms
55,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Random;
import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);
        int L = scan.nextInt();
        int M = scan.nextInt();
        int N = scan.nextInt();
        while(N>=25){
            N-=25;
            M++;
        }
        while(M>=4){
            M-=4;
            L++;
        }
        while(L>=10){
            L-=10;
        }
        System.out.println(L+M+N);
    }
}
0