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:终于AC了

Posted by rommy at 2010-03-22 19:44:18 on Problem 1067
In Reply To:终于AC了 Posted by:qbcqbc at 2010-03-14 18:14:58
能讲一下依据吗?

> var
>  a,b,t:longint;
> begin
>  while not eof do
>   begin
>    readln(a,b);
>    if a>b then
>     begin
>      t:=a;
>      a:=b;
>      b:=t;
>     end;
>    if ((a=trunc(trunc(a*(sqrt(5)-1)/2)*(sqrt(5)+1)/2)) and (b=a+trunc(a*(sqrt(5)-1)/2))) or ((b=a+trunc(a*(sqrt(5)-1)/2)+1) and (a=trunc((trunc(a*(sqrt(5)-1)/2)+1)*(sqrt(5)+1)/2)))then writeln(0)
>      else writeln(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