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