-Code
def solution(num):
if 620 <= num <= 780:
return "Red"
elif 590 <= num < 620:
return "Orange"
elif 570 <= num < 590:
return "Yellow"
elif 495 <= num < 570:
return "Green"
elif 450 <= num < 495:
return "Blue"
elif 425 <= num < 450:
return "Indigo"
elif 380 <= num < 425:
return "Violet"
print(solution(int(input())))
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 10185번 Focus (1) | 2023.11.21 |
---|---|
[백준/파이썬] 30684번 모르고리즘 회장 정하기 (1) | 2023.11.20 |
[백준/파이썬] 7280번 Kortos (0) | 2023.11.18 |
[백준/파이썬] 26432번 Walktober (0) | 2023.11.17 |
[백준/파이썬] 12352번 Hedgemony (Large) (0) | 2023.11.16 |