結果

問題 No.32 貯金箱の憂鬱
コンテスト
ユーザー ondy_candy
提出日時 2016-06-04 00:07:20
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 95 ms / 5,000 ms
コード長 521 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 332 ms
コンパイル使用メモリ 20,704 KB
実行使用メモリ 15,360 KB
最終ジャッジ日時 2026-04-03 12:09:52
合計ジャッジ時間 2,118 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/env python
# -*- coding: utf-8 -*-

def main():
    l = int(input())
    m = int(input())
    n = int(input())

    input_value = {1000:0, 100:l, 25:m, 1:n}
    output_value = {}

    rest = 0
    for key, value in input_value.items():
        rest += key * value
    for j in sorted([i for i in input_value.keys()], reverse=True):
        output_value[j] = rest // j
        rest = rest % j
        
    print(output_value[100] + output_value[25] + output_value[1])
    
if __name__ == '__main__':
    main()
0