Skip to content

Commit 8302184

Browse files
authored
[BOJ] 25206 너의 평점은 (S5)
1 parent b69e7b4 commit 8302184

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

김지호/5주차/260128.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# https://www.acmicpc.net/problem/25206
2+
# 너의 평점은, 실버5
3+
4+
import sys
5+
sys.stdin = open("./input.txt",'r')
6+
7+
scores = {
8+
"A+" : 4.5,
9+
"A0" : 4.0,
10+
"B+" : 3.5,
11+
"B0" : 3.0,
12+
"C+" : 2.5,
13+
"C0" : 2.0,
14+
"D+" : 1.5,
15+
"D0" : 1.0,
16+
"F" : 0.0,
17+
}
18+
19+
sum_등급 = 0.0
20+
sum_학점 = 0.0
21+
22+
for _ in range(20):
23+
_, 학점, 등급 = input().split(" ")
24+
if(등급 != "P"):
25+
sum_등급 += float(학점) * scores[등급]
26+
sum_학점 += float(학점)
27+
print(sum_등급 / sum_학점)
28+

0 commit comments

Comments
 (0)