Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

짱이 될거야

백준 3009: 네 번째 점 Python 본문

알고리즘

백준 3009: 네 번째 점 Python

jeong57 2022. 11. 25. 09:58

https://www.acmicpc.net/problem/3009

 

3009번: 네 번째 점

세 점이 주어졌을 때, 축에 평행한 직사각형을 만들기 위해서 필요한 네 번째 점을 찾는 프로그램을 작성하시오.

www.acmicpc.net

 

x_dots = []
y_dots = []

for i in range(3):
    x, y = map(int, input().split())
    x_dots.append(x)
    y_dots.append(y)

for i in range(3):
    if x_dots.count(x_dots[i]) == 1:
        print(x_dots[i], end=' ')

for i in range(3):
    if y_dots.count(y_dots[i]) == 1:
        print(y_dots[i])

'알고리즘' 카테고리의 다른 글

백준 5014: 스타트링크 Python (BFS)  (0) 2022.11.29
백준 7569: 토마토 Python (BFS)  (0) 2022.11.28
백준 25501: 재귀의 귀재 Python  (0) 2022.11.25
백준 2566: 최댓값 Python  (0) 2022.11.24
백준 2738: 행렬 덧셈  (0) 2022.11.24
Comments