백준 / 25206번 / 너의 평점은 / python 파이썬
·
코딩테스트/백준 (python)
문제 : https://www.acmicpc.net/problem/25206 코드 score = {'A+':4.5, 'A0':4.0, 'B+':3.5, 'B0':3.0, 'C+':2.5, 'C0':2.0, 'D+':1.5, 'D0':1.0, 'F':0}count = 0result = 0for i in range(20): inp = input().split(' ') if inp[2] != 'P': result += float(inp[1]) * score[inp[2]] count += float(inp[1])print('%.6f' %(result / count)) 알게된 것