結果

問題 No.32 貯金箱の憂鬱
ユーザー kkron4221kkron4221
提出日時 2019-01-18 23:30:59
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 614 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-23 07:25:59
合計ジャッジ時間 1,067 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
hundred = input()
hundred = int(hundred)
quarter = input()
quarter = int(quarter)
one = input()
one = int(one)
total = hundred * 100 + quarter * 25 + one * 1
bill = total / 1000
coin = total - math.floor(bill) * 1000
coin_num = 0
hund_coin = coin / 100
if hund_coin > 0:
    coin = coin - math.floor(hund_coin) * 100 
    coin_num = coin_num + math.floor(hund_coin)
quart_coin = coin / 25
if quart_coin > 0:
    coin = coin - math.floor(quart_coin) * 25
    coin_num = coin_num + math.floor(quart_coin)
one_coin = coin / 1
if one_coin > 0:
    coin_num = coin_num + math.floor(one_coin)
print(coin_num)
0