結果

問題 No.32 貯金箱の憂鬱
ユーザー SaYaSaYa
提出日時 2015-11-07 23:33:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 514 bytes
コンパイル時間 1,941 ms
コンパイル使用メモリ 71,684 KB
実行使用メモリ 56,012 KB
最終ジャッジ日時 2023-09-30 07:58:29
合計ジャッジ時間 4,162 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,852 KB
testcase_01 AC 117 ms
55,792 KB
testcase_02 AC 115 ms
55,504 KB
testcase_03 AC 114 ms
55,788 KB
testcase_04 AC 118 ms
56,012 KB
testcase_05 AC 116 ms
55,544 KB
testcase_06 AC 116 ms
55,820 KB
testcase_07 AC 117 ms
55,916 KB
testcase_08 AC 118 ms
55,820 KB
testcase_09 AC 117 ms
55,732 KB
testcase_10 AC 117 ms
55,420 KB
testcase_11 AC 118 ms
55,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int l = Integer.parseInt(scanner.next());
        int m = Integer.parseInt(scanner.next());
        int n = Integer.parseInt(scanner.next());
        int total = ((l * 100) + (m * 25) + n);
        int count = 0;
        count += (total % 1000) / 100;
        count += (total % 100) / 25;
        count += (total % 25);
        System.out.println(count);
    }
}
0