- 谁拿了最多奖学金
- @ 2017-05-22 16:07:25
var s,sa:string;
    ans,b,c:array[0..100]of longint;
    i,j,k,l:integer;
    ll:char;
    ss:string;
begin
    readln(i);
   for j:=1 to i do begin
    k:=0;
    s:='';
    ss:='';
    read(s);
    read(b[j]);
    read(c[j]);
    if (b[j]>85) and (c[j]>80) then ans[j]:=ans[j]+4000;
    if (b[j]>90) then ans[j]:=ans[j]+2000;
    read(ss);
    if (ss='Y') and (c[j]>80) then ans[j]:=ans[j]+850;
    ss:='';
    read(ss);
    if (ss='Y') and (b[j]>85) then ans[j]:=ans[j]+1000;
    readln(k);
    if (k>0) and (b[j]>80) then ans[j]:=ans[j]+8000;
    if ans[j]>ans[l] then begin
    l:=j;
    sa:=s;
    end;
   end;
    k:=0;
writeln(sa);
    writeln(ans[l]);
    k:=0;
    for j:=1 to i do k:=k+ans[j];
    writeln(k);
    end.
1 条评论
- 
  mdb LV 7 @ 2017-07-07 20:33:39字符串得用循环读吧.. 
- 1