-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path17826.cpp
More file actions
58 lines (56 loc) · 827 Bytes
/
17826.cpp
File metadata and controls
58 lines (56 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// 17826. 나의 학점은?
// 2019.11.09
// 입문용
#include<iostream>
#include<string>
using namespace std;
int scores[51];
int main()
{
for (int i = 1; i <= 50; i++)
{
cin >> scores[i];
}
int score;
cin >> score;
int cnt = 0;
for (int i = 1; i <= 50; i++)
{
if (score == scores[i])
{
cnt = i;
break;
}
}
string ans;
if (cnt <= 5)
{
ans = "A+";
}
else if (cnt <= 15)
{
ans = "A0";
}
else if (cnt <= 30)
{
ans = "B+";
}
else if (cnt <= 35)
{
ans = "B0";
}
else if (cnt <= 45)
{
ans = "C+";
}
else if (cnt <= 48)
{
ans = "C0";
}
else
{
ans = "F";
}
cout << ans << endl;
return 0;
}