Skip to content

Commit dbe9904

Browse files
authored
[BOJ] #2309.일곱난쟁이 / 브론즈1 / 20분(∆)
1 parent 065549d commit dbe9904

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import sys
22
input = sys.stdin.readline
33

4-
# 9개의 정수를 한번에 받는다
54
heights = [int(input()) for _ in range(9)]
65

7-
# 9개의 정수 중 7개를 뽑는다
86
for i in range(9):
9-
for j in range(i+1, 9):
7+
for j in range(i + 1, 9):
108
if sum(heights) - heights[i] - heights[j] == 100:
11-
heights.remove(heights[i])
12-
heights.remove(heights[j])
13-
14-
heights.sort()
15-
print(*heights, sep='\n')
9+
result = [heights[k] for k in range(9) if k != i and k != j]
10+
result.sort()
11+
print(*result, sep='\n')
12+
exit()

0 commit comments

Comments
 (0)