- 谁拿了最多奖学金
- 2009-08-22 13:34:06 @
program alice;
var a:array[1..100] of integer;
b:array[1..100,1..20] of char;
st:string;
m,n,k,l,ch:char;
x,i,e,f,g,num,sum,som:integer;
begin
assign(input,'alice.in');reset(input);
assign(output,'alice.out');rewrite(output);
read(x);
for i:=1 to x do
begin
for num:=1 to 20 do
begin
read(ch);
if ch' ' then
b:=ch
else break;
end;
read(e);
read(f);
read(l);
read(m);
read(k);
read(n);
read(g);
if ((e>80) and(g>0))
then a[i]:=a[i]+8000;
if ((e>85)and (f>80))
then a[i]:=a[i]+4000;
if (e>90)
then a[i]:=a[i]+2000;
if (e>85) and(n='Y')
then a[i]:=a[i]+1000;
if (f>80) and (m='Y')
then a[i]:=a[i]+850;
end;
som:=0;
for i:=1 to x do
if a[i]>som
then
begin
som:=a[i];
e:=i;
end;
for i:=1 to 20 do
st:=st+b[e,i];
writeln(st);
writeln(a[e]);
sum:=0;
for i:=1 to x do
sum:=sum+a[i];
write(sum);
close(input);close(output);
end.
3 条评论
-
qjl LV 9 @ 2009-08-22 18:21:18
vijos不支持文件输入输出吧。
-
2009-08-22 14:37:19@
...
计算上没问题
就是结果显示比正常的多了一行空格...
不知道为什么 -
2009-08-22 13:39:36@
读入部分出了问题……注意读入字符和数字的区别……
- 1