문제 : https://www.acmicpc.net/problem/1806 첫번째 제출 코드 (시간초과) import sys def solve(): start = 0 end = 0 answer = N+1 while end = S: if answer > (end+1 - start): answer = (end+1 - start) start += 1 if start > end: end += 1 start -= 1 else: end += 1 if answer == N+1: print(0) else: print(answer) return if __name__ == "__main__": input = sys.stdin.readline N, S = map..