結果

問題 No.32 貯金箱の憂鬱
ユーザー spacenautspacenaut
提出日時 2016-05-14 22:03:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 441 bytes
コンパイル時間 1,980 ms
コンパイル使用メモリ 71,168 KB
実行使用メモリ 56,312 KB
最終ジャッジ日時 2023-09-30 08:09:02
合計ジャッジ時間 4,336 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,824 KB
testcase_01 AC 122 ms
55,932 KB
testcase_02 AC 122 ms
56,032 KB
testcase_03 AC 121 ms
56,236 KB
testcase_04 AC 121 ms
55,980 KB
testcase_05 AC 120 ms
56,312 KB
testcase_06 AC 137 ms
55,776 KB
testcase_07 AC 120 ms
55,416 KB
testcase_08 AC 120 ms
55,992 KB
testcase_09 AC 121 ms
56,232 KB
testcase_10 AC 121 ms
55,656 KB
testcase_11 AC 122 ms
56,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class No0032{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int a100 = sc.nextInt();
		int a025 = sc.nextInt();
		int a001 = sc.nextInt();
		
		if(a001 / 25 > 0){
			a025 += a001 / 25;
			a001 %= 25;
		}
		if(a025 / 4 > 0){
			a100 += a025 / 4;
			a025 %= 4;
		}
		if(a100 / 10 > 0){
			a100 %= 10;
		}
		
		int result = a001 + a025 + a100;
		System.out.println(result);
	}
}
0