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 xiaobai1 at 2007-08-31 21:58:06 on Problem 1658
var
  a:array [1..4] of longint;
  i,j,k,l,n:longint;
begin
  readln(n);
  for i:=1 to n do
    begin
      fillchar(a,sizeof(a),0);
      for j:=1 to 4 do read(a[j]);
      for j:=1 to 4 do write(a[j],' ');
      for j:=4 downto 1 do
        for k:=1 to j-1 do a[k]:=a[k+1]-a[k];
      l:=0;
      for j:=1 to 4 do l:=l+a[j];
      writeln(l);
    end;
end.


谁能帮我看看,牛們!!
pku1658
怎么输入1 2 4 8输出15的???

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