We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4fd090 commit b4d6da4Copy full SHA for b4d6da4
1 file changed
live9/test93/문제1/백한결.py
@@ -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