Notice
Recent Posts
Recent Comments
Link
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Archives
Today
Total
관리 메뉴

Deep CV

[백준] - 11047 파이썬 python 본문

Python/백준(BOJ) 알고리즘

[백준] - 11047 파이썬 python

Present_Kim 2021. 7. 11. 17:18

n, k = map(int, input().split())
a = [0 for _ in range(n)]
cost = 0
for i in range(n):
  a[i]= int(input())
for i in range(n-1,-1,-1):
  cost = cost + (k // a[i])
  k = k - (a[i] * (k // a[i]))
print(cost)

 

'Python > 백준(BOJ) 알고리즘' 카테고리의 다른 글

[백준] - 1946파이썬 python  (0) 2021.07.14
[백준] - 13305 파이썬 python  (0) 2021.07.11
[백준] - 1541파이썬 python  (0) 2021.07.11
[백준] - 11399 파이썬 python  (0) 2021.07.11
[백준] - 1931 파이썬 python  (0) 2021.07.11