結果

問題 No.2681 ゲームセンターの両替
ユーザー Yakumo221Yakumo221
提出日時 2024-03-20 21:37:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 82,228 KB
実行使用メモリ 53,320 KB
最終ジャッジ日時 2024-04-15 10:12:57
合計ジャッジ時間 2,206 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,436 KB
testcase_01 AC 38 ms
52,824 KB
testcase_02 AC 38 ms
52,872 KB
testcase_03 AC 39 ms
52,888 KB
testcase_04 AC 40 ms
51,628 KB
testcase_05 AC 44 ms
52,272 KB
testcase_06 AC 40 ms
52,152 KB
testcase_07 AC 40 ms
51,868 KB
testcase_08 AC 41 ms
52,468 KB
testcase_09 AC 39 ms
51,708 KB
testcase_10 AC 39 ms
52,532 KB
testcase_11 AC 40 ms
52,768 KB
testcase_12 AC 38 ms
52,352 KB
testcase_13 AC 38 ms
52,312 KB
testcase_14 AC 39 ms
52,352 KB
testcase_15 AC 38 ms
52,084 KB
testcase_16 AC 39 ms
52,440 KB
testcase_17 AC 42 ms
52,576 KB
testcase_18 AC 39 ms
53,224 KB
testcase_19 AC 41 ms
52,556 KB
testcase_20 AC 40 ms
52,180 KB
testcase_21 AC 39 ms
53,320 KB
testcase_22 AC 40 ms
52,024 KB
testcase_23 AC 38 ms
53,272 KB
testcase_24 AC 39 ms
53,256 KB
testcase_25 AC 40 ms
52,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

c,y = map(int, input().split())

y = y //100

ce = "can't exchange"
ne = "no exchange"

if (y) < c:
    print(ce)
    exit()

if (y % 5) >= c:
    print(ne)
    exit()

k = y // 5
res = y % 5

need = c-res
r = -(-need // 5) * 5
print(r+res)


# print(k,res,need,r)



0