結果

問題 No.32 貯金箱の憂鬱
ユーザー HaleakalaHaleakala
提出日時 2018-02-18 18:07:10
言語 Java19
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 548 bytes
コンパイル時間 3,272 ms
コンパイル使用メモリ 72,556 KB
実行使用メモリ 56,224 KB
最終ジャッジ日時 2023-09-30 13:05:03
合計ジャッジ時間 5,609 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
56,108 KB
testcase_01 AC 121 ms
56,140 KB
testcase_02 AC 121 ms
56,028 KB
testcase_03 AC 117 ms
56,224 KB
testcase_04 AC 120 ms
55,936 KB
testcase_05 AC 122 ms
55,948 KB
testcase_06 AC 119 ms
55,836 KB
testcase_07 AC 121 ms
55,580 KB
testcase_08 AC 118 ms
55,848 KB
testcase_09 AC 119 ms
55,836 KB
testcase_10 AC 120 ms
55,852 KB
testcase_11 AC 119 ms
55,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Answer {
	public static void main(String str[]) {
        Scanner sc = new Scanner(System.in);

        int num_100 = Integer.valueOf(sc.nextLine());
        int num_25 = Integer.valueOf(sc.nextLine());
        int num_1 = Integer.valueOf(sc.nextLine());

        int sum = 0;

        num_25 += num_1 / 25;
        num_1 = num_1 % 25;

        num_100 += num_25 / 4;
        num_25 = num_25 % 4;

        num_100 = num_100 % 10;

        sum = num_1 + num_25 + num_100;
        System.out.println(sum);
	}
}
0