- 问答
- 2009-05-08 13:09:29 @
var
a:array[1..32]of longint;
i,j,temp:longint;
x,z:qword;
n:int64;
begin
readln(n);
fillchar(a,sizeof(a),0);
for i:=1 to 32 do
begin
a[i]:=n mod 2;
n:=n div 2;
end;
for i:=1 to 16 do
begin
temp:=a[i];
a[i]:=a;
a:=temp;
end;
j:=1;
x:=0;
for i:=1 to 32 do
begin
x:=x+a[i]*j;
j:=j*2;
end;
writeln(x);
end.
0 条评论
目前还没有评论...