結果

問題 No.32 貯金箱の憂鬱
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-11 04:56:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 465 bytes
コンパイル時間 2,016 ms
コンパイル使用メモリ 70,760 KB
実行使用メモリ 56,096 KB
最終ジャッジ日時 2023-09-30 08:17:39
合計ジャッジ時間 4,292 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,820 KB
testcase_01 AC 127 ms
55,264 KB
testcase_02 AC 127 ms
55,868 KB
testcase_03 AC 129 ms
55,336 KB
testcase_04 AC 125 ms
55,940 KB
testcase_05 AC 126 ms
55,332 KB
testcase_06 AC 125 ms
55,652 KB
testcase_07 AC 126 ms
53,900 KB
testcase_08 AC 126 ms
56,096 KB
testcase_09 AC 126 ms
55,688 KB
testcase_10 AC 126 ms
55,272 KB
testcase_11 AC 126 ms
55,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int L = sc.nextInt();
        int M = sc.nextInt();
        int N = sc.nextInt();
        int total = L*100 + M*25 + N;
        int coinsum = total%1000;
        int c100 = coinsum/100 ;
        int c25 = (coinsum%100)/25 ;
        int c1 = coinsum%25 ;
        int r = c100 + c25 + c1 ;
        System.out.println(r);
    }
}
0