Skip to content

Commit cf26bc9

Browse files
committed
[level 3] Title: 최고의 집합, Time: 0.67 ms, Memory: 9.92 MB -BaekjoonHub
1 parent 063ac27 commit cf26bc9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

프로그래머스/3/12938. 최고의 집합/README.md

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

55
### 성능 요약
66

7-
메모리: 9.9 MB, 시간: 0.77 ms
7+
메모리: 9.92 MB, 시간: 0.67 ms
88

99
### 구분
1010

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

1717
### 제출 일자
1818

19-
2025년 05월 16일 21:28:50
19+
2025년 05월 16일 21:37:14
2020

2121
### 문제 설명
2222

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
def solution(n:int, s:int) -> list:
2-
div, n_mod_diff = s//n, n-s%n
3-
return [-1] if s < n else [div + (i >= n_mod_diff) for i in range(n)]
1+
solution=lambda n,s: [-1]*(not (x:=s//n)) or (y:=n-s%n) and [x+(i >= y) for i in range(n)]

0 commit comments

Comments
 (0)