Problem G: 零起点学算法27——等级分制度
#include<stdio.h> int main() { int a,b; while(scanf("%d %d",&a,&b)!=EOF) if(1500+a*5+b*5>=1800) printf("A"); if(1500+a*5+b*5>=1700&&1500+a*5+b*5<=1799) printf("B"); if(1500+a*5+b*5>=1600&&1500+a*5+b*5<=1699) printf("C"); if(1500+a*5+b*5<1600) printf("D"); return 0; }