Skip to content

Commit cb96cd3

Browse files
committed
[BOJ] 너의 평점은 / 실버 5 / 20분
https://www.acmicpc.net/problem/25206
1 parent fc91986 commit cb96cd3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
rating = ['A+', 'A0', 'B+', 'B0', 'C+', 'C0', 'D+', 'D0', 'F']
2+
grade = [4.5, 4.0, 3.5, 3.0, 2.5, 2.0, 1.5, 1.0, 0]
3+
4+
total = 0
5+
result = 0
6+
for _ in range(20):
7+
s, p, g = input().split()
8+
p = float(p)
9+
if g != 'P':
10+
total += p
11+
result += p * grade[rating.index(g)]
12+
13+
print('%.6f' % (result / total))

0 commit comments

Comments
 (0)