| ||||||||||
| 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 | |||||||||
根据定理写的PASCAL 1AC 0MSvar
n,k,m,a,b,c:longint;
begin
while not eof do
begin
readln(n,k);
m:=n-k;
a:=0;
b:=0;
c:=0;
while n<>0 do
begin
n:=n div 2;
a:=a+n;
end;
while m<>0 do
begin
m:=m div 2;
b:=b+m;
end;
while k<>0 do
begin
k:=k div 2;
c:=c+k;
end;
if (a-b>c) 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