結果

問題 No.32 貯金箱の憂鬱
ユーザー kameyama_skameyama_s
提出日時 2023-04-18 13:21:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 113 ms / 5,000 ms
コード長 584 bytes
コンパイル時間 2,189 ms
コンパイル使用メモリ 73,960 KB
実行使用メモリ 41,728 KB
最終ジャッジ日時 2024-04-21 13:14:55
合計ジャッジ時間 3,992 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
41,532 KB
testcase_01 AC 110 ms
40,012 KB
testcase_02 AC 109 ms
41,260 KB
testcase_03 AC 99 ms
41,544 KB
testcase_04 AC 113 ms
41,300 KB
testcase_05 AC 109 ms
41,304 KB
testcase_06 AC 94 ms
41,568 KB
testcase_07 AC 94 ms
41,456 KB
testcase_08 AC 111 ms
41,280 KB
testcase_09 AC 99 ms
41,436 KB
testcase_10 AC 106 ms
41,728 KB
testcase_11 AC 113 ms
41,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        
        int x = a * 100;
        int y = b * 25;
        int z = c * 1;
        
        int total = x + y + z;
        
        int x1000 = total % 1000;
        int total100 = x1000 / 100;
        int total25 = x1000 % 100 / 25;
        int total1 = x1000 % 100 % 25 / 1;
        
        System.out.println(total100 + total25 + total1);
    }
}
0