Skip to content

Commit b4d6da4

Browse files
author
hangyeol
committed
93차 1번 문제풀이
1 parent f4fd090 commit b4d6da4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

live9/test93/문제1/백한결.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
def solution(number, k):
2+
max_num = []
3+
4+
for i in number:
5+
while max_num and k > 0 and max_num[-1] < i:
6+
max_num.pop()
7+
k -= 1
8+
max_num.append(i)
9+
10+
answer = ''.join(max_num[:len(number) - k])
11+
12+
return answer

0 commit comments

Comments
 (0)