結果

問題 No.32 貯金箱の憂鬱
ユーザー dazydazy
提出日時 2016-09-01 23:40:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 549 bytes
コンパイル時間 2,278 ms
コンパイル使用メモリ 72,028 KB
実行使用メモリ 56,144 KB
最終ジャッジ日時 2023-09-30 08:12:22
合計ジャッジ時間 4,807 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
55,736 KB
testcase_01 AC 130 ms
55,592 KB
testcase_02 AC 128 ms
55,872 KB
testcase_03 AC 128 ms
55,716 KB
testcase_04 AC 128 ms
56,040 KB
testcase_05 AC 128 ms
55,616 KB
testcase_06 AC 127 ms
55,292 KB
testcase_07 AC 130 ms
55,752 KB
testcase_08 AC 129 ms
55,884 KB
testcase_09 AC 133 ms
55,908 KB
testcase_10 AC 128 ms
56,144 KB
testcase_11 AC 125 ms
55,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

        if (L < 0 || L > 1000 || M < 0 || M > 1000 || N < 0 || N > 1000) System.exit(1);

        int sum = 100*L + 25*M + 1*N;
        sum = sum%1000;
        L = sum/100;
        sum = sum%100;
        M = sum/25;
        N = sum%25;
        sum = L + M + N;

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