满意答案
wiii67155
2013.09.09
采纳率:44% 等级:7
已帮助:358人
var i,j,k,n,a,b,times:longint;
ans,temp:string;
x:array[0..68,0..68] of qword;
begin
read(n);
write('(a+b)^',n,'=');
x[0,0]:=0;
x[0,1]:=1;
x[0,2]:=0;
for i:=1 to n do
for j:=1 to i+1 do
x[i,j]:=x[i-1,j-1]+x[i-1,j];
a:=n;
b:=0;
for i:=1 to n+1 do
begin
if x[n,i]<>1
then write(x[n,i]);
if a>1
then write('a^',a);
if a=1
then write('a');
if b>1
then write('b^',b);
if b=1
then write('b');
inc(b);
dec(a);
if i<>n+1
then write('+')
else writeln;
end;
end.
00分享举报