結果

問題 No.32 貯金箱の憂鬱
ユーザー kuramubonnkuramubonn
提出日時 2023-02-01 20:28:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 5,000 ms
コード長 335 bytes
コンパイル時間 3,596 ms
コンパイル使用メモリ 72,300 KB
実行使用メモリ 57,752 KB
最終ジャッジ日時 2023-09-14 06:26:34
合計ジャッジ時間 6,371 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,392 KB
testcase_01 AC 113 ms
56,400 KB
testcase_02 AC 121 ms
55,716 KB
testcase_03 AC 121 ms
55,796 KB
testcase_04 AC 117 ms
55,508 KB
testcase_05 AC 110 ms
56,600 KB
testcase_06 AC 112 ms
54,384 KB
testcase_07 AC 110 ms
55,736 KB
testcase_08 AC 119 ms
55,964 KB
testcase_09 AC 118 ms
55,716 KB
testcase_10 AC 119 ms
57,752 KB
testcase_11 AC 112 ms
55,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(),c = sc.nextInt();
		
		if(c  >= 25) {
			b += c / 25;
			c = c % 25;
		}
		if(b >= 4) {
			a += b / 4;
			b = b % 4;
		}
		a = a % 10;
		
		System.out.println(a + b + c);
	}
}
0