We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afa172a commit 408ffefCopy full SHA for 408ffef
프로그래머스/1/42862. 체육복/README.md
@@ -4,7 +4,7 @@
4
5
### 성능 요약
6
7
-메모리: 10 MB, 시간: 0.01 ms
+메모리: 9.29 MB, 시간: 0.02 ms
8
9
### 구분
10
@@ -16,7 +16,7 @@
16
17
### 제출 일자
18
19
-2024년 08월 04일 20:49:00
+2025년 04월 21일 13:41:49
20
21
### 문제 설명
22
프로그래머스/1/42862. 체육복/체육복.py
@@ -1,19 +1,16 @@
1
def solution(n, lost, reserve):
2
- # 정렬
3
lost.sort()
reserve.sort()
-
- # lost, reserve에 공통으로 있는 요소 제거
+
for i in reserve[:]:
if i in lost:
reserve.remove(i)
lost.remove(i)
11
12
- # 체육복 빌려주기(나의 앞 번호부터 확인)
13
for i in reserve:
14
if i-1 in lost:
15
lost.remove(i-1)
elif i+1 in lost:
lost.remove(i+1)
- return n-len(lost)
+ return n - len(lost)
0 commit comments