|
|
back to boardPls find my mistake var a,b:array[1..1000000] of integer; i,c,n,k,m,l:integer; d:int64; begin l:=1; d:=0; readln(n); c:=1; for i:=1 to n-1 do c:=c*10; for i:=1 to n do begin read(a[i],b[i]); readln; end; for i:=1 to n do begin k:=a[i]+b[i]; m:=(c*a[i]+c*b[i]); d:=d+(c*a[i]+c*b[i]); if m>k then c:=m div(k*10); end; writeln(d); readln end. Re: Pls find my mistake Posted by Alibek 4 Mar 2008 19:20 integer doesn't take so much |
|
|