diff --git "a/wnsmir/\352\267\270\353\246\254\353\224\224/\354\232\224\352\262\251\354\213\234\354\212\244\355\205\234.py" "b/wnsmir/\352\267\270\353\246\254\353\224\224/\354\232\224\352\262\251\354\213\234\354\212\244\355\205\234.py" new file mode 100644 index 0000000..945916c --- /dev/null +++ "b/wnsmir/\352\267\270\353\246\254\353\224\224/\354\232\224\352\262\251\354\213\234\354\212\244\355\205\234.py" @@ -0,0 +1,12 @@ +def solution(targets): + # 끝나는 지점 기준 오름차순 정렬 + targets.sort(key=lambda x: x[1]) + + count = 0 + last_shot = -1 + for start, end in targets: + if start >= last_shot: + count += 1 + last_shot = end + + return count \ No newline at end of file