結果

問題 No.32 貯金箱の憂鬱
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-14 23:35:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 380 bytes
コンパイル時間 3,581 ms
コンパイル使用メモリ 70,812 KB
実行使用メモリ 56,196 KB
最終ジャッジ日時 2023-09-30 13:25:18
合計ジャッジ時間 4,162 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
56,196 KB
testcase_01 AC 121 ms
55,516 KB
testcase_02 AC 122 ms
55,712 KB
testcase_03 AC 121 ms
55,788 KB
testcase_04 AC 122 ms
55,712 KB
testcase_05 AC 124 ms
55,860 KB
testcase_06 AC 120 ms
55,812 KB
testcase_07 AC 118 ms
55,560 KB
testcase_08 AC 121 ms
55,796 KB
testcase_09 AC 121 ms
55,672 KB
testcase_10 AC 118 ms
55,676 KB
testcase_11 AC 120 ms
56,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		int en1000 = 0;
		int en100 = sc.nextInt();
		int en25 = sc.nextInt();
		int en1 = sc.nextInt();
		
		en25 += en1/25;
		en1 %= 25;
		
		en100 += en25/4;
		en25 %= 4;
		
		en1000 += en100/10;
		en100 %= 10;
		
		System.out.println(en100+en25+en1);
		
	}
}
0