結果

問題 No.32 貯金箱の憂鬱
ユーザー Hiroaki Kono
提出日時 2017-10-26 21:03:40
言語 Java
(openjdk 23)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 532 bytes
コンパイル時間 3,419 ms
コンパイル使用メモリ 74,060 KB
実行使用メモリ 54,332 KB
最終ジャッジ日時 2024-07-23 06:47:34
合計ジャッジ時間 5,733 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No32 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int hundred = s.nextInt();
        int quarter = s.nextInt();
        int one = s.nextInt();
        int sum = hundred * 100 + quarter * 25 + one;

        int changedHundred = (sum % 1000) / 100;
        int changedQuarter = ((sum % 1000) % 100) / 25;
        int changedOne = ((sum % 1000) % 100) % 25;
        System.out.println(changedHundred + changedQuarter + changedOne);
    }
}
0