Skip to content

Commit

Permalink
[BOJ] 11047 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
heerucan committed Apr 11, 2022
1 parent 41a2de7 commit 06ab8ec
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions BOJ/11047.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
n, k = list(map(int, input().split()))

coin = []
result = 0
for i in range(n):
coin.append(int(input()))

coin.sort(reverse=True)

for i in range(len(coin)):
result += k // coin[i]
k = k % coin[i]

print(result)


16 changes: 16 additions & 0 deletions CodingTest/CH4 구현/11047.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
n, k = list(map(int, input().split()))

coin = []
result = 0
for i in range(n):
coin.append(int(input()))

coin.sort(reverse=True)

for i in range(len(coin)):
result += k // coin[i]
k = k % coin[i]

print(result)


0 comments on commit 06ab8ec

Please sign in to comment.