結果

問題 No.32 貯金箱の憂鬱
コンテスト
ユーザー mitsushino
提出日時 2017-12-14 17:17:18
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 95 ms / 5,000 ms
+ 69µs
コード長 478 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 293 ms
コンパイル使用メモリ 21,408 KB
実行使用メモリ 15,868 KB
最終ジャッジ日時 2026-08-23 20:30:03
合計ジャッジ時間 2,782 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# -*- coding: utf-8 -*-

if __name__ == '__main__':
    bill_1000 = 0
    coin_100 = int(input())
    coin_25 = int(input())
    coin_1 = int(input())

    quotient, remainder = divmod(coin_1, 25)
    coin_25 += quotient
    coin_1 = remainder

    quotient, remainder = divmod(coin_25, 4)
    coin_100 += quotient
    coin_25 = remainder

    quotient, remainder = divmod(coin_100, 10)
    bill_1000 += quotient
    coin_100 = remainder

    print(coin_100 + coin_25 + coin_1)
0