목록티스토리챌린지 (2)
종식당

https://softeer.ai/practice/7695 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai문제 설명첫 줄에 입력받을 좌표의 개수를 입력받고 이 개수만큼 x, y좌표를 쌍으로 입력받는다. 이때 y좌표가 최소인 점을 구해 쌍을 출력하면 된다. 오류 제출 코드import sysinput = sys.stdin.readlinedict = {}N = int(input()) for i in range(N): x, y = map(int,input().split()) dict[x] = ymin_y = min(dict.values())result = []for key, value in dict.items(): if value == min_y: res..

https://softeer.ai/practice/7626 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai 문제 설명문제에서 산타는 거리가 가장 가까운 두 마을을 방문하기 때문에 두 수의 차가 가장 작은 수의 조합 개수를 출력하면 된다. 시간 초과 제출 코드import sysfrom itertools import combinationsinput = sys.stdin.readlinen = int(input())lst = list(map(int,input().split()))combi = list(combinations(lst,2))lst_sub = []dict = {}cnt = 0for i in combi: dict[i] = i[1]-i[0]for value in dict.val..