結果

問題 No.32 貯金箱の憂鬱
ユーザー d07ki3bq1uzd07ki3bq1uz
提出日時 2019-09-28 00:57:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 439 bytes
コンパイル時間 2,856 ms
コンパイル使用メモリ 71,952 KB
実行使用メモリ 56,304 KB
最終ジャッジ日時 2023-09-30 13:39:23
合計ジャッジ時間 4,679 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,004 KB
testcase_01 AC 125 ms
56,148 KB
testcase_02 AC 122 ms
55,672 KB
testcase_03 AC 124 ms
55,716 KB
testcase_04 AC 121 ms
55,828 KB
testcase_05 AC 122 ms
56,064 KB
testcase_06 AC 123 ms
55,452 KB
testcase_07 AC 126 ms
55,936 KB
testcase_08 AC 123 ms
56,304 KB
testcase_09 AC 124 ms
55,768 KB
testcase_10 AC 123 ms
56,244 KB
testcase_11 AC 125 ms
56,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int l = sc.nextInt();
        int m = sc.nextInt();
        int n = sc.nextInt();
        
     if (n >= 25){
        m += n/25;
        n = n%25;
     }if (m >= 4){
        l += m/4;
        m = m%4 ;
     }if (l >= 10){    
        l = l%10;
     }
     System.out.println(l + m + n);
    }
}
0