N,K = map(int,input().split())
money = []
Total_count = 0
for i in range(N):
money.append(input())
money = list(map(int, money))
money.sort(reverse=True)
for i in range(0,N):
if int(money[i]) <= K:
Total_count += int(K/int(money[i]))
count = int(K/int(money[i]))
K = K-count*int(money[i])
elif K <= 0:
break
print(Total_count)
'IT > 알고리즘 공부' 카테고리의 다른 글
(백준) 2798번 - 블랙잭 (0) | 2019.08.28 |
---|---|
(codeup) 1084 : [기초-종합] 빛 섞어 색 만들기(설명) (0) | 2019.08.28 |
(codeup) 1928 : (재귀함수) 우박수 (3n+1) (basic) (0) | 2019.08.28 |
(codeup) 1915 : (재귀함수) 피보나치 수열 (0) | 2019.08.28 |
(codeup) 3321 : 최고의 피자 (0) | 2019.08.20 |