- 谁拿了最多奖学金
- 2014-11-05 22:29:14 @
var
n,i,max,best,all:longint;
s:array[1..100] of string;
a,b,f,e:array[1..100] of longint;
c,d:array[1..100] of char;
ch:char;
begin
readln(n);
max:=0;
for i:=1 to n do;
begin
f[i]:=0;
read(ch);
while ch<>' ' do
begin
s[i]:=s[i]+ch;
read(ch);
end;
readln(a[i],b[i],c[i],ch,d[i],ch,e[i]);
if(a[i]>80) and (e[i]>0) then f[i]:=f[i]+8000;
if(a[i]>85) and (b[i]>80) then f[i]:=f[i]+4000;
if(a[i]>90) then f[i]:=f[i]+2000;
if(a[i]>85) and (d[i]='Y') then f[i]:=f[i]+1000;
if(b[i]>80) and (c[i]='Y') then f[i]:=f[i]+850;
all:=all+f[i];
if max<f[i] then
begin
max:=f[i];
best:=i;
end;
end;
writeln(s[best]);
writeln(max);
writeln(all);
end.
2 条评论
-
Gwendolyn_Wuu LV 7 @ 2015-08-09 13:11:59
在c[i]前面加个ch试试
-
2014-11-06 22:55:57@
有人吗?
- 1