[프로그래머스] Python / 점의 위치 구하기
2024. 3. 22. 14:45ㆍCoding/프로그래머스-Python
문제 링크
https://school.programmers.co.kr/learn/courses/30/lessons/120841
문제
코드
def solution(dot):
if dot[0] > 0 and dot[1] > 0:
return 1
elif dot[0] < 0 and dot[1] > 0:
return 2
elif dot[0] < 0 and dot[1] < 0:
return 3
else:
return 4
'Coding > 프로그래머스-Python' 카테고리의 다른 글
[프로그래머스] Python / 문자열 뒤집기 (0) | 2024.03.22 |
---|---|
[프로그래머스] Python / 양꼬치 (0) | 2024.03.22 |
[프로그래머스] Python / 피자 나눠 먹기(1) (0) | 2024.03.22 |
[프로그래머스] Python / 중복된 숫자 개수 (0) | 2024.03.22 |
[프로그래머스] Python / 세균 증식 (1) | 2024.03.22 |