Skip to content

Commit b90ab99

Browse files
authored
Add code checking same students
1 parent 279a58a commit b90ab99

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

programmers/Lv.1/max_training_cloth.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
def solution(n, lost, reserve):
22
count = 0
33
for num in lost:
4-
if num - 1 in reserve:
4+
if num in reserve:
5+
reserve.remove(num)
6+
count += 1
7+
elif num - 1 in reserve:
58
reserve.remove(num - 1)
69
count += 1
710
elif num + 1 in reserve:

0 commit comments

Comments
 (0)