Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

[pas]为什么过不了?

Posted by mayakovsky at 2004-08-09 11:07:16 on Problem 1653
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator