結果

問題 No.32 貯金箱の憂鬱
ユーザー yun_appyun_app
提出日時 2016-05-09 16:04:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 765 bytes
コンパイル時間 2,131 ms
コンパイル使用メモリ 72,472 KB
実行使用メモリ 49,444 KB
最終ジャッジ日時 2023-09-30 08:07:12
合計ジャッジ時間 3,539 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
49,404 KB
testcase_01 AC 44 ms
49,444 KB
testcase_02 AC 44 ms
49,328 KB
testcase_03 AC 44 ms
49,168 KB
testcase_04 AC 45 ms
49,176 KB
testcase_05 AC 44 ms
49,272 KB
testcase_06 AC 43 ms
49,280 KB
testcase_07 AC 45 ms
49,184 KB
testcase_08 AC 44 ms
49,280 KB
testcase_09 AC 44 ms
49,256 KB
testcase_10 AC 45 ms
49,132 KB
testcase_11 AC 44 ms
49,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int sum = 0;
        sum += 100 * Integer.parseInt(br.readLine());
        sum +=  25 * Integer.parseInt(br.readLine());
        sum += Integer.parseInt(br.readLine());
        
        int coin = sum%1000;
        int ans = coin/100;
        coin = coin%100;
        ans += coin/25;
        coin = coin%25;
        ans += coin;
        System.out.println(ans);
    }
}
0