結果

問題 No.32 貯金箱の憂鬱
ユーザー Mcpu3Mcpu3
提出日時 2018-04-15 22:15:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 420 bytes
コンパイル時間 2,030 ms
コンパイル使用メモリ 71,044 KB
実行使用メモリ 56,196 KB
最終ジャッジ日時 2023-09-30 13:09:27
合計ジャッジ時間 4,397 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,984 KB
testcase_01 AC 126 ms
56,196 KB
testcase_02 AC 125 ms
55,848 KB
testcase_03 AC 125 ms
55,528 KB
testcase_04 AC 125 ms
55,744 KB
testcase_05 AC 125 ms
55,916 KB
testcase_06 AC 126 ms
56,000 KB
testcase_07 AC 127 ms
55,988 KB
testcase_08 AC 124 ms
55,640 KB
testcase_09 AC 125 ms
55,788 KB
testcase_10 AC 127 ms
56,132 KB
testcase_11 AC 125 ms
55,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no32{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int l=stdIn.nextInt();
		int m=stdIn.nextInt();
		int n=stdIn.nextInt();
		int o=0;
		int x;
		if(n>=25) {
			x=n/25;
			m+=x;
			n=n%25;
		}
		if(m>=4) {
			x=m/4;
			l+=x;
			m=m%4;
		}
		if(l>=10) {
			x=l/10;
			o+=x;
			l=l%10;
		}
		System.out.println(l+m+n);
	}
}
0