結果

問題 No.32 貯金箱の憂鬱
ユーザー springspring
提出日時 2019-06-12 13:26:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 446 bytes
コンパイル時間 1,865 ms
コンパイル使用メモリ 71,552 KB
実行使用メモリ 57,980 KB
最終ジャッジ日時 2023-09-30 13:32:21
合計ジャッジ時間 4,023 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,028 KB
testcase_01 AC 118 ms
55,684 KB
testcase_02 AC 119 ms
55,744 KB
testcase_03 AC 118 ms
55,720 KB
testcase_04 AC 119 ms
55,780 KB
testcase_05 AC 119 ms
55,868 KB
testcase_06 AC 120 ms
56,036 KB
testcase_07 AC 117 ms
55,924 KB
testcase_08 AC 118 ms
57,980 KB
testcase_09 AC 120 ms
55,960 KB
testcase_10 AC 115 ms
55,520 KB
testcase_11 AC 119 ms
56,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int oneH = sc.nextInt();
		int tweF = sc.nextInt();
		int oneC = sc.nextInt();
		sc.close();
		if(oneC>=25){
			tweF += oneC/25;
			oneC = oneC%25;
		}
		if(tweF>=4){
			oneH += tweF/4;
			tweF = tweF%4;
		}
		if(oneH>=10){
			oneH = oneH%10;
		}
		System.out.println(oneH + tweF + oneC);
	}// mainmethod

} // class
0