본문 바로가기
알고리즘/백준

백준-14681번(4분면고르기)-python

by nyeongha 2023. 11. 23.

백준-14681번(4분면고르기)-python

def Quadrant(x, y):
    if -1000 <= x < 0:
        if -1000 <= y < 0:
            print(3)
        else:
            print(2)
    else:
        if -1000 <= y < 0:
            print(4)
        else:
            print(1)


a, b = [int(input()) for x in range(2)]
Quadrant(a, b)

'알고리즘 > 백준' 카테고리의 다른 글

백준-2438번(별찍기-1)-python  (0) 2023.11.23
백준-1110번(더하기사이클)-python  (0) 2023.11.23
백준-11022번(A+B-8)-python  (0) 2023.11.23
백준-11021번(A+B-7)-python  (0) 2023.11.23
백준-8393번(합)-python  (0) 2023.11.23