반응형
백준: 6778번 Which Alien? (Python3)
Which Alien? 성공다국어
시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 | 512 MB | 2201 | 1529 | 1468 | 71.055% |
문제
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.
예제 입력 1
4
5
예제 출력 1
VladSaturnian
예제 입력 2
2
3
예제 출력 2
VladSaturnian
GraemeMercurian
예제 입력 3
8
6
예제 출력 3
답안
1
2
3
4
5
6
7
8
9
|
anthena = int(input())
eyes = int(input())
if anthena >= 3 and eyes <=4:
print("TroyMartian")
if anthena <= 6 and eyes >= 2:
print("VladSaturnian")
if anthena <= 2 and eyes <= 3:
print("GraemeMercurian")
|
cs |
반응형
'공부 > 코딩테스트' 카테고리의 다른 글
백준: 7891번 Can you add this? (Python3) (0) | 2022.08.03 |
---|---|
백준: 6810번 ISBN (Python3) (0) | 2022.08.03 |
백준: 6764번 Sounds fishy! (Python3) (0) | 2022.08.03 |
백준: 6763번 Speed fines are not fine! (Python3) (0) | 2022.08.03 |
백준: 6749번 Next in line (Python3) (0) | 2022.08.03 |
댓글