-코드
x, y = list(map(int, input().split()))
t = int(input())
r1 = r2 = 100
for i in range(t):
x2, y2 = list(map(int, input().split()))
if abs(x - x2) + abs(y - y2) <= abs(r1 - x) + abs(r2 - y):
r1 = x2
r2 = y2
print(r1, r2)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬]2869번 달팽이는 올라가고 싶다 (0) | 2021.04.19 |
---|---|
[백준/파이썬]11651번 좌표 정렬하기 2 (0) | 2021.04.19 |
[백준/파이썬]17912번 License to Launch (0) | 2021.04.18 |
[백준/파이썬]15036번 Just A Minim (0) | 2021.04.18 |
[백준/파이썬]8658번 Liczba (0) | 2021.04.18 |