結果

問題 No.32 貯金箱の憂鬱
ユーザー tukatuka
提出日時 2021-06-14 21:48:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 14 ms / 5,000 ms
コード長 402 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 10,724 KB
実行使用メモリ 7,920 KB
最終ジャッジ日時 2023-08-26 07:10:59
合計ジャッジ時間 1,374 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,780 KB
testcase_01 AC 14 ms
7,908 KB
testcase_02 AC 13 ms
7,776 KB
testcase_03 AC 14 ms
7,832 KB
testcase_04 AC 14 ms
7,776 KB
testcase_05 AC 12 ms
7,712 KB
testcase_06 AC 13 ms
7,868 KB
testcase_07 AC 13 ms
7,852 KB
testcase_08 AC 13 ms
7,716 KB
testcase_09 AC 13 ms
7,920 KB
testcase_10 AC 14 ms
7,796 KB
testcase_11 AC 14 ms
7,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
M = int(input())
N = int(input())

s = 0
f = 0
h = 0

G = L * 100 + M * 25 + N

#print(G)
for i in range(3):
    if G >= 1000:
        s = G // 1000
        G = G - (1000 * s)
        #print(G)
    elif G >= 100:
        f = G // 100
        G = G - (100 * f)
        #print(G)
    elif G >= 25:
        h = G // 25
        G = G - (25 * h)
        #print(G)
    
print(int(G + h + f))
0