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 |
我用int64怎么还错?var mt,mi :longint; x,y , x1,y1,s :int64; ch :char; begin //assign(input,'p.c'); reset(input); readln(mt); for mi:=1 to mt do begin x:=0; y:=0; s:=0; repeat x1:=x; y1:=y; read(ch); case ch of '8':inc(y); '2':dec(y); '6':inc(x); '4':dec(x); '9':begin dec(y); inc(x) end; '7':begin dec(y); dec(x) end; '3':begin inc(y); inc(x) end; '1':begin inc(y); dec(x) end; '5':break; end; s:=s+x1*y-y1*x; until false; readln; while seekeoln do readln; if s<0 then s:=-s; if odd(s) then writeln(s shr 1,'.5') else writeln(s shr 1); end; end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator