結果

問題 No.32 貯金箱の憂鬱
ユーザー yuuki121yuuki121
提出日時 2020-12-21 23:36:26
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 567 bytes
コンパイル時間 4,197 ms
コンパイル使用メモリ 74,096 KB
実行使用メモリ 53,352 KB
最終ジャッジ日時 2023-10-21 12:05:35
合計ジャッジ時間 5,090 ms
ジャッジサーバーID
(参考情報)
judge10 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
53,352 KB
testcase_01 AC 49 ms
53,352 KB
testcase_02 WA -
testcase_03 AC 48 ms
53,340 KB
testcase_04 WA -
testcase_05 AC 50 ms
53,340 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 50 ms
53,340 KB
testcase_10 AC 48 ms
53,344 KB
testcase_11 AC 48 ms
52,224 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 br = new BufferedReader(new InputStreamReader(System.in));

		int a = Integer.parseInt(br.readLine()); // 100
		int b = Integer.parseInt(br.readLine()); //  25
		int c = Integer.parseInt(br.readLine()); //   1

		int b2 = b + (c / 25);
		int a2 = a + (b / 4);

		int sum = c - (c / 25) * 25 +
				b2 - (b2 / 4) * 4 +
				a2 - (a2 / 10) * 10;

		System.out.println(sum);
	}

}
0