| ||||||||||
| 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 | |||||||||
我过了var yh:array[1..100,1..100] of longint;
n,i,j:integer;
begin
readln(n);
for i:=1 to n do
for j:=1 to i do begin
if j=1 then yh[i,j]:=1 else
if i=j then yh[i,j]:=1 else
yh[i,j]:=yh[i-1,j]+yh[i-1,j-1];
if j=1 then write(yh[i,j]) else write(' ',yh[i,j]);
if j=i then writeln;
end;
end.
不高兴优化,这点空间无所谓。。。。注意是4个空格。
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator