結果

問題 No.32 貯金箱の憂鬱
ユーザー yagi2yagi2
提出日時 2017-04-14 01:07:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 114 ms / 5,000 ms
コード長 514 bytes
コンパイル時間 2,157 ms
コンパイル使用メモリ 72,124 KB
実行使用メモリ 55,828 KB
最終ジャッジ日時 2023-09-30 10:16:23
合計ジャッジ時間 3,734 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
53,908 KB
testcase_01 AC 102 ms
55,620 KB
testcase_02 AC 114 ms
55,644 KB
testcase_03 AC 111 ms
54,020 KB
testcase_04 AC 111 ms
55,828 KB
testcase_05 AC 105 ms
55,740 KB
testcase_06 AC 104 ms
55,696 KB
testcase_07 AC 102 ms
55,460 KB
testcase_08 AC 102 ms
55,424 KB
testcase_09 AC 104 ms
55,700 KB
testcase_10 AC 101 ms
55,620 KB
testcase_11 AC 108 ms
55,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int L = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int N = Integer.parseInt(sc.next());

        int ans = 0;

        // 1->25
        M += (int)N / 25;
        ans += N % 25;
        // 25->100
        L += (int)M / 4;
        ans += M % 4;
        // 100->1000
        ans += L % 10;

        System.out.println(ans);
    }
}
0