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:why WAIn Reply To:why WA Posted by:gongenhao at 2007-04-30 19:15:01 > program pku3219; > var > i,j,k,n,m,s:longint; > function bi(u:longint):longint; > var > v,w:longint; > begin > w:=0; > while (u mod 2=0) and (u>0) do begin > inc(w); > u:=u div 2; > end; > exit(w); > end; > begin > while not seekeof(input) do begin > readln(n,k); > s:=bi(n)-bi(k)-bi(n-k); > if s>0 then writeln(0) else writeln(1); > end; > end. 额、我也这么做的也wa了 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator