結果

問題 No.32 貯金箱の憂鬱
ユーザー jp_stejp_ste
提出日時 2016-03-02 19:41:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 538 bytes
コンパイル時間 2,768 ms
コンパイル使用メモリ 71,440 KB
実行使用メモリ 56,388 KB
最終ジャッジ日時 2023-09-30 08:03:58
合計ジャッジ時間 4,294 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,724 KB
testcase_01 AC 126 ms
55,776 KB
testcase_02 AC 124 ms
56,388 KB
testcase_03 AC 124 ms
56,048 KB
testcase_04 AC 122 ms
55,740 KB
testcase_05 AC 122 ms
55,900 KB
testcase_06 AC 124 ms
55,992 KB
testcase_07 AC 125 ms
55,848 KB
testcase_08 AC 124 ms
56,336 KB
testcase_09 AC 124 ms
55,824 KB
testcase_10 AC 127 ms
55,840 KB
testcase_11 AC 125 ms
56,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner scan = new Scanner(System.in)) {
            int L = scan.nextInt();
            int M = scan.nextInt();
            int N = scan.nextInt();

            int divN = N / 25;
            int remN = N % 25;
            int divM = (M+divN) / 4;
            int remM = (M+divN) % 4;
            int remL = (L+divM) % 10;
            
            int ans = remN + remM + remL;
            System.out.println(ans);
        }
    }
}
0