Notice
Recent Posts
Recent Comments
Link
관리 메뉴

윤일무이

[백준-Python] 6778번: Which Alien? 본문

🥧 Python/⚙️ 코딩테스트

[백준-Python] 6778번: Which Alien?

썸머몽 2023. 3. 8. 14:08
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