結果

問題 No.32 貯金箱の憂鬱
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-04-23 20:47:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 622 bytes
コンパイル時間 2,429 ms
コンパイル使用メモリ 71,308 KB
実行使用メモリ 49,900 KB
最終ジャッジ日時 2023-09-30 10:21:55
合計ジャッジ時間 3,489 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,272 KB
testcase_01 AC 44 ms
49,900 KB
testcase_02 AC 45 ms
49,416 KB
testcase_03 AC 43 ms
49,408 KB
testcase_04 AC 43 ms
49,336 KB
testcase_05 AC 44 ms
49,212 KB
testcase_06 AC 45 ms
49,172 KB
testcase_07 AC 45 ms
49,240 KB
testcase_08 AC 44 ms
49,220 KB
testcase_09 AC 44 ms
49,112 KB
testcase_10 AC 45 ms
49,192 KB
testcase_11 AC 44 ms
49,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int L = Integer.parseInt(reader.readLine());
        int M = Integer.parseInt(reader.readLine());
        int N = Integer.parseInt(reader.readLine());

        M += N / 25;
        N = N - 25 * (N / 25);
        L += M / 4;
        M = M - 4 * (M / 4);
        int tmp = L / 10;
        L = L - 10*tmp;
        System.out.println(N + M + L);

    }
}
0