| ||||||||||
| 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 | |||||||||
终于AC了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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator