import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int MaxAward=0;String stuname=""; int sumAll=0; for (int i = 0; i < n; i++) { int sum=0; String name=sc.next(); int score1=sc.nextInt();//期末平均成绩 int score2=sc.nextInt();//班级评议成绩 char bgb=sc.next().charAt(0); char west=sc.next().charAt(0); int paper=sc.nextInt(); if(score1>80&&paper>=1){ sum+=8000; sumAll+=8000;} if(score1>85&&score2>80){ sum+=4000; sumAll+=4000;} if(score1>90){ sum+=2000;sumAll+=2000;} if(score1>85&&west=='Y') { sum+=1000;sumAll+=1000;} if(score2>80&&bgb=='Y') { sum+=850;sumAll+=850;} if(sum>MaxAward){MaxAward=sum; stuname=name;} } System.out.printf("%s\n%d\n%d",stuname,MaxAward,sumAll); } }
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题6.11 (C语言代码)for循环浏览:1172 |
【亲和数】 (C语言代码)浏览:899 |
C语言程序设计教程(第三版)课后习题8.8 (C语言代码)浏览:1481 |
C语言程序设计教程(第三版)课后习题7.2 (C语言代码)浏览:812 |
C语言程序设计教程(第三版)课后习题8.6 (C语言代码)浏览:592 |
printf基础练习 (C语言代码)浏览:2106 |
小O的图案 (C语言代码)浏览:974 |
买不到的数目 (C语言代码)浏览:3131 |
C语言程序设计教程(第三版)课后习题11.8 (C语言代码)浏览:1058 |
C语言程序设计教程(第三版)课后习题6.7 (C语言代码)浏览:615 |