結果

問題 No.32 貯金箱の憂鬱
ユーザー TatsuDXTatsuDX
提出日時 2016-09-08 23:33:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 315 bytes
コンパイル時間 3,158 ms
コンパイル使用メモリ 71,736 KB
実行使用メモリ 39,708 KB
最終ジャッジ日時 2023-09-30 08:14:11
合計ジャッジ時間 5,562 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
39,048 KB
testcase_01 AC 126 ms
39,104 KB
testcase_02 AC 126 ms
39,172 KB
testcase_03 AC 125 ms
39,708 KB
testcase_04 AC 127 ms
39,416 KB
testcase_05 AC 124 ms
39,332 KB
testcase_06 AC 124 ms
39,304 KB
testcase_07 AC 126 ms
39,212 KB
testcase_08 AC 126 ms
39,224 KB
testcase_09 AC 126 ms
39,696 KB
testcase_10 AC 126 ms
39,044 KB
testcase_11 AC 128 ms
39,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = 0, cnt = 0;
		s += sc.nextInt()*100;
		s += sc.nextInt()*25;
		s += sc.nextInt();
		s %= 1000;
		cnt += s/100;
		s %= 100;
		cnt += s/25 + s%25;
		System.out.println(cnt);
	}
}
0