2020-12-20 10:36:12 +00:00
|
|
|
#include <bits/stdc++.h>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
int score;
|
|
|
|
double gpa = 0.0;
|
|
|
|
cin >> score;
|
|
|
|
if (score >= 90) {
|
|
|
|
gpa = 4.0;
|
2021-11-19 09:01:13 +00:00
|
|
|
} else if (60 <= score && score <= 89) {
|
2020-12-20 10:36:12 +00:00
|
|
|
gpa = 4.0 - (90 - score) * 0.1;
|
2021-11-19 09:01:13 +00:00
|
|
|
} else {
|
2020-12-20 10:36:12 +00:00
|
|
|
if (floor(sqrt(score) * 10.0) >= 90.0) {
|
|
|
|
gpa = 4.0;
|
2021-11-19 09:01:13 +00:00
|
|
|
} else if (floor(sqrt(score) * 10.0) >= 60.0) {
|
2020-12-20 10:36:12 +00:00
|
|
|
gpa = 4.0 - (90.0 - floor(sqrt(score) * 10.0)) * 0.1;
|
2021-11-19 09:01:13 +00:00
|
|
|
} else {
|
2020-12-20 10:36:12 +00:00
|
|
|
gpa = 0.0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cout << fixed << setprecision(1) << gpa << endl;
|
|
|
|
return 0;
|
|
|
|
}
|