显示原始代码
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n = 0, a = 0;
cin >> n;
a = n - 1;
int rate[a] = {};
for (int i = 0; i <= a; i++) {
cin >> rate[i];
}
for (int i = 0; i <= a; i++) {
if (rate[i] < 1200) {
cout << "Newbie"
<< " ";
if (rate[i] >= 1700)
cout << "YES" << endl;
else
cout << "NO" << endl;
} else if (1200 <= rate[i] && rate[i] < 1400) {
cout << "Pupil"
<< " ";
if (rate[i] >= 1700)
cout << "YES" << endl;
else
cout << "NO" << endl;
} else if (1400 <= rate[i] && rate[i] < 1600) {
cout << "Specialist"
<< " ";
if (rate[i] >= 1700)
cout << "YES" << endl;
else
cout << "NO" << endl;
} else if (1600 <= rate[i] && rate[i] < 1900) {
cout << "Expert"
<< " ";
if (rate[i] >= 1700)
cout << "YES" << endl;
else
cout << "NO" << endl;
} else if (1900 <= rate[i] && rate[i] < 2100) {
cout << "Candidate Master"
<< " ";
if (rate[i] >= 1700)
cout << "YES" << endl;
else
cout << "NO" << endl;
} else if (2100 <= rate[i] && rate[i] < 2300) {
cout << "Master"
<< " ";
if (rate[i] >= 1700)
cout << "YES" << endl;
else
cout << "NO" << endl;
} else if (2300 <= rate[i] && rate[i] < 2400) {
cout << "International Master"
<< " ";
if (rate[i] >= 1700)
cout << "YES" << endl;
else
cout << "NO" << endl;
} else if (2400 <= rate[i] && rate[i] < 2600) {
cout << "Grandmaster"
<< " ";
if (rate[i] >= 1700)
cout << "YES" << endl;
else
cout << "NO" << endl;
} else if (2600 <= rate[i] && rate[i] < 3000) {
cout << "International Grandmaster"
<< " ";
if (rate[i] >= 1700)
cout << "YES" << endl;
else
cout << "NO" << endl;
} else if (3000 <= rate[i] && rate[i] < 4000) {
cout << "Legendary Grandmaster"
<< " ";
if (rate[i] >= 1700)
cout << "YES" << endl;
else
cout << "NO" << endl;
} else
cout << "Tourist"
<< " "
<< "YES";
}
getchar();
return 0;
}