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

我过了

Posted by inzaghi_sf at 2004-05-07 11:27:27 on Problem 1653
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:
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