📄 stack.pas
字号:
program E2_14;{stack_count}
var c:array[1..10000] of longint;
n,i,j,k,ys,len:longint;
begin
assign(input,'stack.in');
assign(output,'stack.out');
reset(input);
readln(n);
close(input);
fillchar(c,sizeof(c),0);
c[1]:=1;len:=1;
for i:=2*n downto n+2 do
begin
for j:=1 to len do c[j]:=c[j]*i;
for j:=1 to len+4 do
begin
c[j+1]:=c[j+1]+c[j] div 10;
c[j]:=c[j] mod 10;
end;
len:=len+5;
while c[len]=0 do dec(len);
end;
for i:=n downto 2 do
begin
ys:=0;
for j:=len downto 1 do
begin
k:=c[j];
c[j]:=(k+ys*10) div i;
ys:=(k+ys*10) mod i;
end;
while c[len]=0 do dec(len);
end;
rewrite(output);
for i:=len downto 1 do write(c[i]);
writeln;
close(output)
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -