1 parent 1ba1490 commit 20a4e62Copy full SHA for 20a4e62
2 files changed
프로그래머스/2/42883. 큰 수 만들기/README.md
@@ -4,7 +4,7 @@
4
5
### 성능 요약
6
7
-메모리: 12 MB, 시간: 176.06 ms
+메모리: 14.5 MB, 시간: 52.43 ms
8
9
### 구분
10
@@ -16,7 +16,7 @@
16
17
### 제출 일자
18
19
-2025년 04월 23일 14:25:00
+2026년 07월 02일 16:50:22
20
21
### 문제 설명
22
프로그래머스/2/42883. 큰 수 만들기/큰 수 만들기.py
@@ -1,11 +1,10 @@
1
def solution(number, k):
2
stack = []
3
- for num in number:
- while stack and k > 0 and stack[-1] < num:
+ for n in number:
+ while stack and k > 0 and stack[-1] < n:
stack.pop()
k -= 1
- stack.append(num)
-
+ stack.append(n)
if k > 0:
stack = stack[:-k]
11
return "".join(stack)
0 commit comments