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

Re:超级水题,1AC,PASCAL代码

Posted by 999aaa888aaa777aaa at 2015-04-25 16:38:35 on Problem 1658
In Reply To:超级水题,1AC,PASCAL代码 Posted by:demaxiya at 2012-08-28 09:14:18
> var
> n,a,b,c,d,e,i,j:longint;
> re:real;
> bb:boolean;
> procedure chj(x:integer);
> begin
> case x of
> 1:j:=b-a;
> 2:if j<>c-b then exit;
> 3:if j<>d-c then exit;
> 4:begin writeln(j+d);bb:=false; end;
> end;
> if bb then chj(x+1);
> end;
> procedure chc(x:integer);
> begin
> case x of
> 1:re:=b/a;
> 2:if re<>c/b then exit;
> 3:if re<>d/c then exit;
> 4:begin writeln((re*d):0:0);bb:=false; end;
> end;
> if bb then chc(x+1);
> end;
> begin
> read(n);
> for i:=1 to n do
> begin
> read(a,b,c,d);
> write(a,' ',b,' ',c,' ',d,' ');
> bb:=true;
> chj(1);
> j:=0;
> if bb then chc(1);
> end;
> 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