- 谁拿了最多奖学金
- 2015-05-29 15:05:22 @
var
i,j,n,max:longint;
s:int64;
lolo:string;
c:char;
qimo,banji,lunwen,jianjin:array [1..100] of longint;
nam:array [1..100,1..100] of char;
ganbu,xibu:array [1..100] of char;
procedure jianli(i:longint);
begin
if (qimo[i]>80) and (lunwen[i]>0) then jianjin[i]:=jianjin[i]+8000;
if (qimo[i]>85) and (banji[i]>80) then jianjin[i]:=jianjin[i]+4000;
if qimo[i]>90 then jianjin[i]:=jianjin[i]+2000;
if (qimo[i]>85) and (xibu[i]='Y') then jianjin[i]:=jianjin[i]+1000;
if (banji[i]>80) and (ganbu[i]='Y') then jianjin[i]:=jianjin[i]+850;
end;
begin
readln(n);
for i:=1 to n do
begin
j:=0;
repeat
inc(j);
read(nam[i][j]);
until nam[i][j]=' ';
read(qimo[i],banji[i]);
read(c);
read(ganbu[i]);
read(c);
read(xibu[i],lunwen[i]);
jianli(i);
s:=s+jianjin[i];
end;
for i:=n downto 1 do
if max<=jianjin[i] then begin max:=jianjin[i];lolo:=nam[i]; end;
writeln(lolo);
writeln(max);
writeln(s);
end.
6 条评论
-
numlock LV 7 @ 2015-06-27 09:46:25
var
i,j,n,max:longint;
s:int64;
lolo:string;
c:char;
qimo,banji,lunwen,jianjin:array [1..100] of longint;
nam:array [1..100,1..100] of char;
ganbu,xibu:array [1..100] of char;
procedure jianli(i:longint);
begin
if (qimo[i]>80) and (lunwen[i]>0) then jianjin[i]:=jianjin[i]+8000;
if (qimo[i]>85) and (banji[i]>80) then jianjin[i]:=jianjin[i]+4000;
if qimo[i]>90 then jianjin[i]:=jianjin[i]+2000;
if (qimo[i]>85) and (xibu[i]='Y') then jianjin[i]:=jianjin[i]+1000;
if (banji[i]>80) and (ganbu[i]='Y') then jianjin[i]:=jianjin[i]+850;
end;
beginread(n);
for i:=1 to n do
begin
j:=0;
repeat
inc(j);
read(nam[i][j]);
until nam[i][j]=' ';
read(qimo[i],banji[i]);
read(c);
read(ganbu[i]);
read(c);
read(xibu[i],lunwen[i]);
jianli(i);
s:=s+jianjin[i];
end;
for i:=n downto 1 do
if max<=jianjin[i] then begin max:=jianjin[i];lolo:=nam[i]; end;
i:=1;
while lolo[i]<>' ' do
begin
write(lolo[i]);
inc(i);
end;
writeln();
writeln(max);
writeln(s);end.
-
2015-06-27 09:45:31@
已过
-
2015-05-31 15:54:47@
细节问题,一般过了样例都是悲剧的开始,自己好好检查一下吧,看着看着你就知道哪里有问题了
-
2015-05-30 17:14:49@
。。。。。。
-
2015-05-29 23:17:42@
我也是,不可思议
-
2015-05-29 16:25:40@
坑爹的pascal 字符串
- 1