using namespace std;
int main() {
int score = 77;
cin >> score;
if (score == 100) cout << 'A';
else if (score < 60) cout << 'E';
else printf("%c", 'D' - (score - 60) / 10);
return 0;
}
如图,只有两种特殊情况,一种是刚好等于100,另一种是没到60分,做个判断就好,其他没有必要else if了,直接用ASCII出结果