728x90
6778번: Which Alien?
Canada Cosmos Control has received a report of another incident. They believe that an alien has illegally entered our space. A person who witnessed the appearance of the alien has come forward to describe the alien’s appearance. It is your role within th
www.acmicpc.net
📌 풀이
최소 3개 안테나 & 최대 4개의 눈을 가진 t 외계인
최대 6개 안테나 & 최소 2개의 눈을 가진 v 외계인
최대 2개 안테나 & 최대 3개의 눈을 가진 g 외계인
입력 첫 줄에는 목격자가 본 안테나 수, 둘째 줄에는 목격자가 본 눈의 수가 들어온다.
출력에는 외계인의 이름이 출력되면 된다.
예를 들어 입력값이
4
5
라고 하면 안테나 4개 눈 5개를 가질 수 있는 V 외계인의 이름이 출력되어야 한다.
✅ 코드
antenna = int(input())
eyes = int(input())
if antenna >= 3 and eyes <= 4 :
print("TroyMartian")
if antenna <= 6 and eyes >= 2 :
print("VladSaturnian")
if antenna <= 2 and eyes <= 3 :
print("GraemeMercurian")
728x90
'🥧 Python > ⚙️ 코딩테스트' 카테고리의 다른 글
[백준-Python] 7891번: Can you add this? (0) | 2023.03.08 |
---|---|
[백준-Python] 6810번: ISBN (0) | 2023.03.08 |
[백준-Python] 6749번: Next in line (0) | 2023.03.08 |
[백준-Python] 5522번: 카드 게임 (0) | 2023.03.07 |
[백준-Python] 5217번: 쌍의 합 (0) | 2023.03.07 |