結果

問題 No.32 貯金箱の憂鬱
ユーザー kkron4221kkron4221
提出日時 2019-01-18 23:30:59
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 614 bytes
コンパイル時間 621 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 8,008 KB
最終ジャッジ日時 2023-09-30 13:24:15
合計ジャッジ時間 1,688 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,004 KB
testcase_01 AC 17 ms
7,976 KB
testcase_02 AC 17 ms
7,956 KB
testcase_03 AC 18 ms
7,944 KB
testcase_04 AC 17 ms
8,000 KB
testcase_05 AC 17 ms
7,948 KB
testcase_06 AC 17 ms
7,896 KB
testcase_07 AC 17 ms
7,888 KB
testcase_08 AC 17 ms
8,008 KB
testcase_09 AC 17 ms
7,896 KB
testcase_10 AC 17 ms
7,984 KB
testcase_11 AC 17 ms
7,956 KB
権限があれば一括ダウンロードができます

ソースコード

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