結果

問題 No.2681 ゲームセンターの両替
ユーザー PNJPNJ
提出日時 2024-03-20 21:14:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 252 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 82,500 KB
実行使用メモリ 53,624 KB
最終ジャッジ日時 2024-04-15 10:11:40
合計ジャッジ時間 2,107 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,312 KB
testcase_01 AC 44 ms
52,744 KB
testcase_02 AC 40 ms
52,028 KB
testcase_03 AC 39 ms
52,740 KB
testcase_04 AC 41 ms
53,120 KB
testcase_05 AC 40 ms
52,392 KB
testcase_06 AC 45 ms
52,352 KB
testcase_07 AC 52 ms
52,068 KB
testcase_08 AC 39 ms
52,824 KB
testcase_09 AC 39 ms
52,996 KB
testcase_10 AC 39 ms
52,092 KB
testcase_11 AC 40 ms
53,624 KB
testcase_12 AC 40 ms
53,360 KB
testcase_13 AC 40 ms
52,132 KB
testcase_14 AC 41 ms
52,520 KB
testcase_15 AC 39 ms
52,408 KB
testcase_16 AC 39 ms
52,616 KB
testcase_17 AC 38 ms
52,688 KB
testcase_18 AC 39 ms
52,464 KB
testcase_19 AC 40 ms
52,372 KB
testcase_20 AC 39 ms
52,388 KB
testcase_21 AC 39 ms
52,872 KB
testcase_22 AC 39 ms
53,108 KB
testcase_23 AC 39 ms
53,160 KB
testcase_24 AC 39 ms
52,868 KB
testcase_25 AC 39 ms
52,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def Map():
  return list(map(int,input().split()))

C,Y = Map()
x = Y // 500
r = Y % 500
if r // 100 >= C:
  print('no exchange')
  exit()

c = r // 100 + 5*x
if c < C:
  print('can'+chr(39)+'t'+' exchange')
  exit()

n = (c - C) // 5
c -= n*5
print(c)
0