본문 바로가기

Programming [Python]/백준 알고리즘 솔루션

#235 백준 파이썬 [17826] 나의 학점은?

https://www.acmicpc.net/problem/17826

 

Python Code

GPA = []
GPA += ['A+'] * 5
GPA += ['A0'] * 10
GPA += ['B+'] * 15
GPA += ['B0'] * 5
GPA += ['C+'] * 10
GPA += ['C0'] * 3
GPA += ['F'] * 2

score_list = list(map(int, input().split()))
hong = int(input())
print(GPA[score_list.index(hong)])