Input
Output
Sample Input
2 8 10
Sample Output
1 15 9 11
#include <cstdio> #include<iostream> #include <math.h> using namespace std; int main(){ int n; scanf("%d",&n); while(n--) { int s; scanf("%d",&s); int k=s&(-s); k--; printf("%d %d\n",s-k,s+k); } return 0; }
原文请访问:http://xiaoshig.sinaapp.com/?p=197
原文:http://blog.csdn.net/rememberautumn/article/details/38356343