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 |
[pas]为什么过不了?program yanghui(input,output); var n,i,j:integer; function jiecheng(m:integer):integer; var k:integer; begin jiecheng:=1; for k:=1 to m do jiecheng:=jiecheng*k end; function zuhe(da,xiao:integer):integer; var xunhuan,cha:integer; begin if xiao=0 then zuhe:=1 else begin cha:=da-xiao+1;zuhe:=1; for xunhuan:=da downto cha do begin zuhe:=zuhe*xunhuan; end; zuhe:=zuhe div(jiecheng(xiao)) end; end; begin readln(n); n:=n-1; for i:=0 to n do begin for j:=0 to i do write(zuhe(i,j),' ') end; writeln end. 总说输出格式不对/打空格,指定场宽都不行 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator