#include <stdio.h>

int main(void) {
	// your code goes here
    #include <stdio.h>
int main(void) {
    int score;
    printf("请输入分数：");
    scanf("%d", &score);

    if (score < 0 || score > 100) {
        printf("error!\n");
        return 0;
    }

    // 用整数除法把分数分段，简化switch分支
    switch(score / 10) {
        case 10:
        case 9:
        case 8: 
            // 85~100：8/9/10分位，且8开头要≥85
            if (score >= 85) printf("A\n");
            else printf("B\n");
            break;
        case 7: printf("B\n"); break;
        case 6: printf("C\n"); break;
        default: printf("D\n"); // 0~59
    }
    return 0;
}

	return 0;
}
