repo.or.cz
/
kudsource.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
link/cut tree
[kudsource.git]
/
POJ
/
2309.c
blob
06f5bbcf53b4acced01550b03f6ccfab22951fab
1
#include <stdio.h>
2
3
int
lowbit
(
int
x
) {
return
x
& -
x
; }
4
5
int
main
() {
6
int
tcase
,
n
,
delta
;
7
scanf
(
"%d"
,&
tcase
);
8
while
(
tcase
--) {
9
scanf
(
"%d"
,&
n
);
10
delta
=
n
-
lowbit
(
n
);
11
n
-=
delta
;
12
printf
(
"%d %d
\n
"
,
1
+
delta
,
n
*
2
-
1
+
delta
);
13
}
14
return
0
;
15
}