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 |
Re:超级水题,1AC,PASCAL代码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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator