Skip to content

Instantly share code, notes, and snippets.

@YOUNGJUN2
Created July 3, 2019 06:39
Show Gist options
  • Save YOUNGJUN2/27e337e125a200a5f5100ddc572367c8 to your computer and use it in GitHub Desktop.
Save YOUNGJUN2/27e337e125a200a5f5100ddc572367c8 to your computer and use it in GitHub Desktop.
def solution(d, b):
d.sort()
n = 0
for i in d:
if i <= b:
b -= i
n += 1
else:
break
return n
# 문제: https://programmers.co.kr/learn/courses/30/lessons/12982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment