Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Help:为什么是Presentation Error看看我的程序错那儿了? program pku1581; var n,total,timer,time,num,i,j:longint; name,mz:string; t:char; a,b:array[1..4] of integer; begin readln(n); total:=-1; timer:=0; for j:=1 to n do begin read(t); name:=''; while t<>' ' do begin name:=name+t; read(t); end; num:=0; time:=0; for i:=1 to 4 do begin read(a[i],b[i]); if b[i]<>0 then begin inc(num); time:=time+b[i]+(a[i]-1)*20; end; end; if (num>total) or ((num=total) and (time<timer)) then begin total:=num; mz:=name; timer:=time; end; end; write(mz,' ',total,' ',timer); writeln; end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator