結果

問題 No.32 貯金箱の憂鬱
ユーザー yuuki121yuuki121
提出日時 2020-12-21 23:43:09
言語 Java19
(openjdk 21)
結果
AC  
実行時間 51 ms / 5,000 ms
コード長 568 bytes
コンパイル時間 1,705 ms
コンパイル使用メモリ 74,072 KB
実行使用メモリ 53,464 KB
最終ジャッジ日時 2023-10-21 12:05:49
合計ジャッジ時間 2,886 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
53,464 KB
testcase_01 AC 49 ms
53,460 KB
testcase_02 AC 48 ms
53,460 KB
testcase_03 AC 48 ms
53,464 KB
testcase_04 AC 51 ms
52,336 KB
testcase_05 AC 48 ms
53,464 KB
testcase_06 AC 51 ms
53,464 KB
testcase_07 AC 48 ms
53,452 KB
testcase_08 AC 49 ms
52,348 KB
testcase_09 AC 48 ms
53,400 KB
testcase_10 AC 49 ms
53,460 KB
testcase_11 AC 48 ms
53,460 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 + (b2 / 4);

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

		System.out.println(sum);
	}

}
0