์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฌธ์ œ/BOJ_Python

[BOJ/Step2] 9498 : ์‹œํ—˜ ์„ฑ์  (Python)

NaNaRin๐Ÿ™ƒ 2021. 2. 1. 19:47

www.acmicpc.net/problem/9498

 

9498๋ฒˆ: ์‹œํ—˜ ์„ฑ์ 

์‹œํ—˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅ๋ฐ›์•„ 90 ~ 100์ ์€ A, 80 ~ 89์ ์€ B, 70 ~ 79์ ์€ C, 60 ~ 69์ ์€ D, ๋‚˜๋จธ์ง€ ์ ์ˆ˜๋Š” F๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค.

www.acmicpc.net


๋ฌธ์ œ

์‹œํ—˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅ๋ฐ›์•„ 90 ~ 100์ ์€ A, 80 ~ 89์ ์€ B, 70 ~ 79์ ์€ C, 60 ~ 69์ ์€ D, ๋‚˜๋จธ์ง€ ์ ์ˆ˜๋Š” F๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค.

 

์ž…๋ ฅ

์ฒซ์งธ ์ค„์— ์‹œํ—˜ ์ ์ˆ˜๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. ์‹œํ—˜ ์ ์ˆ˜๋Š” 0๋ณด๋‹ค ํฌ๊ฑฐ๋‚˜ ๊ฐ™๊ณ , 100๋ณด๋‹ค ์ž‘๊ฑฐ๋‚˜ ๊ฐ™์€ ์ •์ˆ˜์ด๋‹ค.

 

์ถœ๋ ฅ

์‹œํ—˜ ์„ฑ์ ์„ ์ถœ๋ ฅํ•œ๋‹ค.

 

์˜ˆ์ œ ์ž…๋ ฅ

100

 

์˜ˆ์ œ ์ถœ๋ ฅ 

A


ํ’€์ด

 

# 9498.py

score = int(input())

if score >= 90:
    print("A")
elif score >= 80:
    print("B")
elif score >= 70:
    print("C")
elif score >= 60:
    print("D")
else:
    print("F")