結果

問題 No.2681 ゲームセンターの両替
ユーザー flygonflygon
提出日時 2024-03-20 21:19:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 431 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 82,308 KB
実行使用メモリ 56,248 KB
最終ジャッジ日時 2024-04-15 10:12:12
合計ジャッジ時間 2,223 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
54,660 KB
testcase_01 AC 45 ms
55,292 KB
testcase_02 AC 46 ms
55,172 KB
testcase_03 AC 46 ms
55,440 KB
testcase_04 AC 46 ms
55,728 KB
testcase_05 AC 46 ms
54,548 KB
testcase_06 AC 48 ms
55,432 KB
testcase_07 AC 50 ms
54,908 KB
testcase_08 AC 47 ms
54,916 KB
testcase_09 AC 50 ms
55,472 KB
testcase_10 AC 47 ms
54,852 KB
testcase_11 AC 46 ms
56,248 KB
testcase_12 AC 46 ms
55,672 KB
testcase_13 AC 45 ms
55,468 KB
testcase_14 AC 46 ms
56,124 KB
testcase_15 AC 46 ms
54,664 KB
testcase_16 AC 46 ms
54,788 KB
testcase_17 AC 46 ms
55,704 KB
testcase_18 AC 47 ms
54,360 KB
testcase_19 AC 46 ms
54,780 KB
testcase_20 AC 45 ms
55,312 KB
testcase_21 AC 46 ms
55,948 KB
testcase_22 AC 46 ms
55,252 KB
testcase_23 AC 52 ms
56,124 KB
testcase_24 AC 47 ms
54,980 KB
testcase_25 AC 46 ms
55,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(5*10**5)
input = sys.stdin.readline
from collections import defaultdict, deque, Counter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right
from math import gcd

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

if y < c:
    print("can't exchange")
elif y%5 >= c:
    print("no exchange")
else:
    ans = y%5
    c -= ans
    left = 5*((c+4)//5)
    ans += left
    print(ans)
0