Skip to content

Commit 20a4e62

Browse files
committed
[level 2] Title: 큰 수 만들기, Time: 52.43 ms, Memory: 14.5 MB -BaekjoonHub
1 parent 1ba1490 commit 20a4e62

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

프로그래머스/2/42883. 큰 수 만들기/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### 성능 요약
66

7-
메모리: 12 MB, 시간: 176.06 ms
7+
메모리: 14.5 MB, 시간: 52.43 ms
88

99
### 구분
1010

@@ -16,7 +16,7 @@
1616

1717
### 제출 일자
1818

19-
2025년 04월 23일 14:25:00
19+
2026년 07월 02일 16:50:22
2020

2121
### 문제 설명
2222

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
def solution(number, k):
22
stack = []
3-
for num in number:
4-
while stack and k > 0 and stack[-1] < num:
3+
for n in number:
4+
while stack and k > 0 and stack[-1] < n:
55
stack.pop()
66
k -= 1
7-
stack.append(num)
8-
7+
stack.append(n)
98
if k > 0:
109
stack = stack[:-k]
1110
return "".join(stack)

0 commit comments

Comments
 (0)