728x90
https://www.acmicpc.net/problem/6778
문제
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 the CCC to determine which alien has arrived. There are only 3 alien species that we are aware of, described below:
- TroyMartian, who has at least 3 antenna and at most 4 eyes;
- VladSaturnian, who has at most 6 antenna and at least 2 eyes;
- GraemeMercurian, who has at most 2 antenna and at most 3 eyes.
입력
The first line contain the number of antenna that the witness claimed to have seen on the alien. The second line contain the number of eyes seen on the alien.
출력
The output will be the list of aliens who match the possible description given by the witness. If no aliens match the description, there is no output.
728x90
예제 입력 1
4
5
예제 출력 1
VladSaturnian
예제 입력 2
2
3
예제 출력 2
VladSaturnian
GraemeMercurian
예제 입력 3
8
6
예제 출력 3
(출력 없음.)
# TroyMartian은 적어도 3개의 안테나와 최대 4개의 눈을 가지고 있음.
# VladSaturnian은 최대 6개의 안테나와 적어도 2개의 눈을 가지고 있음.
# GrasmeMercurian은 최대 2개의 안테나와 최대 3개의 눈을 가지고 있음.
# 입력으로 1. 안테나 수, 2. 눈의 수가 주어질 때,
# 해당알 수 있는 외계인명을 출력
antenna = int(input())
eye = int(input())
if antenna >= 3 and eye <= 4:
print('TroyMartian')
if antenna <= 6 and eye >= 2:
print('VladSaturnian')
if antenna <= 2 and eye <= 3:
print('GraemeMercurian')
728x90
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 2743] 단어 길이 재기 (python) (0) | 2022.09.11 |
---|---|
[백준, BOJ 6810] ISBN (python) (0) | 2021.12.18 |
[백준, BOJ 6768] Don’t pass me the ball! (python) (0) | 2021.12.17 |
[백준, BOJ 11866] 요세푸스 문제 0 (python) (0) | 2021.12.17 |
[백준, BOJ 6764] Sounds fishy! (python) (0) | 2021.12.16 |