Skip to content

Commit 4e623c2

Browse files
committed
[level 2] Title: 가장 큰 수, Time: 1405.62 ms, Memory: 26.1 MB -BaekjoonHub
1 parent a2b6f6b commit 4e623c2

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

프로그래머스/2/42746. 가장 큰 수/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# [level 2] 가장 큰 수 - 42746
22

3-
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/42746#qna)
3+
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/42746)
44

55
### 성능 요약
66

7-
메모리: 27.1 MB, 시간: 1417.15 ms
7+
메모리: 26.1 MB, 시간: 1405.62 ms
88

99
### 구분
1010

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

1717
### 제출 일자
1818

19-
2024년 09월 02일 17:14:38
19+
2025년 04월 11일 17:37:12
2020

2121
### 문제 설명
2222

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
def solution(numbers):
2-
ans = ''
3-
numbers = list(map(str, numbers))
4-
numbers.sort(key = lambda x: x*3, reverse=True)
5-
6-
for i in numbers:
7-
ans += i
8-
return str(int(ans))
2+
nums = [str(i) for i in numbers]
3+
nums.sort(key=lambda x: x*3, reverse=True)
4+
return str(int("".join(nums)))

0 commit comments

Comments
 (0)