| ||||||||||
| 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 | |||||||||
why WAprogram 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.
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator