프로그래머스 - 기지국 설치
def solution(n, stations, w): answer = 0 coverRange = 2 * w + 1 underCover = [] start = stations[0] - w end = stations[0] + w # 간격 구하기 if start > 1: underCover.append([1, start]) for i in range(1, len(stations)): curStart, curEnd = stations[i] - w, stations[i] + w if end + 1 < curStart: underCover.append([end + 1, curStart]) end, start = curEnd, curStart if end < n: underCover.append([end + 1, n..
더보기