[프로그래머스] Python / 점의 위치 구하기
2024. 3. 22. 14:45ㆍCoding Test & Algorithms/프로그래머스-Python
문제 링크
https://school.programmers.co.kr/learn/courses/30/lessons/120841
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
문제
코드
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 Test & Algorithms > 프로그래머스-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 |