import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int n=cin.nextInt();
List<Student> list=new ArrayList<Student>();
for(int i=0;i<n;i++)
{
list.add(new Student(cin.next(),cin.nextInt(),cin.nextInt(),cin.next(),cin.next(),cin.nextInt()));
}
Collections.sort(list);
System.out.println(list.get(0).name);
System.out.println(list.get(0).jiangjin);
System.out.println(Student.zongshu);
}
}
class Student implements Comparable<Student>
{
String name;
int lastgrade;
int classgrade;
String classmaster;
String weststudent;
int lunwen;
int jiangjin;
static int zongshu=0;
public Student(String name, int lastgrade, int classgrade, String classmaster, String weststudent,int lunwen) {
super();
this.name = name;
this.lastgrade = lastgrade;
this.classgrade = classgrade;
this.classmaster = classmaster;
this.weststudent = weststudent;
this.lunwen = lunwen;
jisuan();
Student.zongshu+=jiangjin;
}
void jisuan()
{
if(lastgrade>80&&lunwen>0)
{
jiangjin+=8000;
}
if(lastgrade>85&&classgrade>80)
{
jiangjin+=4000;
}
if(lastgrade>90)
{
jiangjin+=2000;
}
if(lastgrade>85&&weststudent.equals("Y"))
{
jiangjin+=1000;
}
if(classgrade>80&&classmaster.equals("Y"))
{
jiangjin+=850;
}
}
@Override
public int compareTo(Student o) {
// TODO Auto-generated method stub
return o.jiangjin-this.jiangjin;
}
}
谁拿了最多奖学金
最新推荐文章于 2024-08-24 17:09:16 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)