[READ-ONLY] Mirror of https://github.com/shuuji3/competitive-programming. 馃洬 Codes submitted to competitive programming platforms
aizu-online-jadge
aoj
atcoder
hackerrank
leetcode
364 B
18 lines
1while True:
2 m, f, r = map(int, input().split())
3 if m == -1 and f == -1 and r == -1:
4 break
5
6 sum = m + f
7 if m == -1 or f == -1:
8 print('F')
9 elif sum >= 80:
10 print('A')
11 elif sum >=65:
12 print('B')
13 elif sum >= 50 or r >= 50:
14 print('C')
15 elif sum >= 30:
16 print('D')
17 else:
18 print('F')