結果

問題 No.32 貯金箱の憂鬱
ユーザー d_makid_maki
提出日時 2019-03-11 16:43:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 470 bytes
コンパイル時間 3,034 ms
コンパイル使用メモリ 72,644 KB
実行使用メモリ 56,764 KB
最終ジャッジ日時 2023-09-30 13:27:49
合計ジャッジ時間 5,254 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,580 KB
testcase_01 AC 117 ms
56,068 KB
testcase_02 AC 121 ms
55,580 KB
testcase_03 AC 123 ms
55,776 KB
testcase_04 AC 118 ms
55,820 KB
testcase_05 AC 118 ms
56,764 KB
testcase_06 AC 118 ms
55,600 KB
testcase_07 AC 122 ms
56,272 KB
testcase_08 AC 120 ms
55,928 KB
testcase_09 AC 120 ms
56,252 KB
testcase_10 AC 118 ms
55,876 KB
testcase_11 AC 120 ms
56,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No32 {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int L = scan.nextInt();
		int M = scan.nextInt();
		int N = scan.nextInt();

		int sum = 100 * L + 25 * M + 1 * N;
		int maisu1 = sum % 1000;
		int maisu2 = maisu1 / 100;
		int maisu3 = (maisu1 % 100) / 25;
		int maisu4 = (maisu1 % 100) % 25;

		int maisu = maisu2 + maisu3 + maisu4;
		System.out.println(maisu);

		scan.close();
	}

}
0