- 谁拿了最多奖学金
- 2018-07-23 22:08:04 @
var
a1:string;
n,i,j,b1,c1:integer;
a:array[1..100] of string;
b,c,f,g:array[1..100] of integer;
d,e:array[1..100] of char;
begin
readln(n);
for i:=1 to n do
begin
readln(a[i],b[i],c[i],d[i],e[i],f[i]);
if (b[i]>80)and(f[i]>=1) then g[i]:=g[i]+8000;
if (b[i]>85)and(c[i]>80) then g[i]:=g[i]+4000;
if b[i]>90 then g[i]:=g[i]+2000;
if (b[i]>85)and(e[i]='Y') then g[i]:=g[i]+1000;
if (c[i]>80)and(d[i]='Y') then g[i]:=g[i]+850;
end;
a1:=a[1];b1:=g[1];c1:=g[1];
for i:=2 to n do
begin
if g[i]>b1 then
begin
a1:=a[i];
b1:=g[i];
c1:=c1+g[i];
end;
end;
writeln(a1);
writeln(b1);
writeln(c1);
end.