ac1048.pas
来自「uralcode」· PAS 代码 · 共 31 行
PAS
31 行
program ural1048;
const
maxn=1000000;
var
d:array[1..maxn div 2]of byte;
n,i,p:longint;
x,y,f:byte;
begin
fillchar(d,sizeof(d),0);
readln(n);
for i:=n downto 1 do begin
p:=(i+1) div 2;
if odd(i) then f:=1 else f:=10;
read(x);read(y);inc(x,y);
inc(d[p],x*f);
end;
p:=(n+1) div 2;
for i:=1 to p-1 do
if d[i]>99 then begin
dec(d[i],100);
inc(d[i+1]);
end;
for i:=p downto 1 do begin
if (i<p) or (not odd(n)) then write(d[i] div 10);
write(d[i] mod 10);
end;
writeln;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?