結果

問題 No.32 貯金箱の憂鬱
ユーザー k__umek__ume
提出日時 2019-04-28 19:31:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 62 ms / 5,000 ms
コード長 602 bytes
コンパイル時間 2,343 ms
コンパイル使用メモリ 76,980 KB
実行使用メモリ 52,588 KB
最終ジャッジ日時 2023-09-30 13:30:48
合計ジャッジ時間 3,819 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
50,828 KB
testcase_01 AC 60 ms
50,812 KB
testcase_02 AC 60 ms
51,136 KB
testcase_03 AC 61 ms
50,740 KB
testcase_04 AC 60 ms
50,880 KB
testcase_05 AC 60 ms
50,828 KB
testcase_06 AC 61 ms
50,808 KB
testcase_07 AC 60 ms
50,808 KB
testcase_08 AC 61 ms
50,820 KB
testcase_09 AC 62 ms
50,592 KB
testcase_10 AC 62 ms
50,656 KB
testcase_11 AC 62 ms
52,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main(String... args) throws IOException {
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) {
            int[] a = reader.lines().limit(3).mapToInt(Integer::parseInt).toArray();
            int sum = (100 * a[0] + 25 * a[1] + a[2]) % 1000;
            int count = sum / 100;
            sum %= 100;
            count += sum / 25;
            System.out.println(count + sum % 25);
        }
    }
}
0