
메모리: 113112 KB, 시간: 116 ms
구현
시험 점수를 입력받아 90 ~ 100점은 A, 80 ~ 89점은 B, 70 ~ 79점은 C, 60 ~ 69점은 D, 나머지 점수는 F를 출력하는 프로그램을 작성하시오.
첫째 줄에 시험 점수가 주어진다. 시험 점수는 0보다 크거나 같고, 100보다 작거나 같은 정수이다.
시험 성적을 출력한다.
#https://www.acmicpc.net/problem/9498
#시험 성적
import sys
input = sys.stdin.readline
a = int(input())
if a>=90:
print("A")
elif a>=80:
print("B")
elif a>=70:
print("C")
elif a>=60:
print("D")
else:
print("F")
#https://www.acmicpc.net/problem/9498
#시험 성적
#9498
import sys
input = sys.stdin.readline
score = int(input())
def fun(score):
if score >= 90:
return print("A")
elif score >= 80:
return print("B")
elif score >= 70:
return print("C")
elif score >= 60:
return print("D")
else:
return print("F")
fun(score)