Skip to content

Commit 67fcfd9

Browse files
author
hangyeol
committed
93차 3번 문제풀이
1 parent b4d6da4 commit 67fcfd9

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

live9/test93/문제3/백한결.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
def solution(routes):
2+
routes.sort(key=lambda x: x[1])
3+
4+
count = 0
5+
camera = -30001
6+
7+
for i in range(len(routes)):
8+
if routes[i][0] > camera:
9+
count += 1
10+
camera = routes[i][1]
11+
12+
return count

0 commit comments

Comments
 (0)