結果

問題 No.32 貯金箱の憂鬱
ユーザー ondy_candyondy_candy
提出日時 2016-06-04 00:07:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 521 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 7,940 KB
最終ジャッジ日時 2023-09-30 08:09:16
合計ジャッジ時間 1,098 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,776 KB
testcase_01 AC 17 ms
7,760 KB
testcase_02 AC 16 ms
7,828 KB
testcase_03 AC 16 ms
7,780 KB
testcase_04 AC 16 ms
7,772 KB
testcase_05 AC 16 ms
7,872 KB
testcase_06 AC 15 ms
7,824 KB
testcase_07 AC 15 ms
7,780 KB
testcase_08 AC 15 ms
7,748 KB
testcase_09 AC 17 ms
7,764 KB
testcase_10 AC 16 ms
7,940 KB
testcase_11 AC 16 ms
7,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/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