結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,928 KB
testcase_01 AC 40 ms
52,728 KB
testcase_02 AC 40 ms
52,364 KB
testcase_03 AC 40 ms
52,324 KB
testcase_04 AC 41 ms
51,984 KB
testcase_05 AC 39 ms
51,756 KB
testcase_06 AC 44 ms
52,120 KB
testcase_07 AC 41 ms
52,152 KB
testcase_08 AC 40 ms
53,632 KB
testcase_09 AC 40 ms
53,348 KB
testcase_10 AC 40 ms
51,696 KB
testcase_11 AC 41 ms
52,212 KB
testcase_12 AC 40 ms
53,120 KB
testcase_13 AC 41 ms
53,012 KB
testcase_14 AC 42 ms
52,692 KB
testcase_15 AC 39 ms
53,036 KB
testcase_16 AC 39 ms
52,336 KB
testcase_17 AC 40 ms
52,828 KB
testcase_18 AC 41 ms
52,280 KB
testcase_19 AC 40 ms
52,560 KB
testcase_20 AC 40 ms
52,632 KB
testcase_21 AC 40 ms
52,360 KB
testcase_22 AC 40 ms
53,128 KB
testcase_23 AC 39 ms
51,872 KB
testcase_24 AC 39 ms
53,364 KB
testcase_25 AC 40 ms
52,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

c,y=map(int,input().split())
l=[10000,5000,2000,1000,500,100]
m=[]

if y<100*c:
  print("can't exchange")
  exit()

for i in l:
  m.append(y//i)
  y%=i
  
if m[-1]>=c:
  print('no exchange')
  exit()
  
print((c-m[-1]-1)//5*5+5+m[-1])

0