#include <bits/stdc++.h>
#define sc(a) scanf("%d",&a)
#define scd(a,b) scanf("%d%d",&a,&b)
#define sct(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define READ freopen ("input.txt","r",stdin)
#define nnn 20
using namespace std;
int main()
{
int num;
int a,b;
// scanf("%d",&n);
while(~sc(num)&&num)
{
bitset<32>foo(num);
// cout<<foo[0]<<" "<<foo[1]<<" "<<foo[2]<<endl;
// cout<<foo.size()<<endl;
// cout<<foo<<endl;
int c=0;
a=b=0;
for(int i=0; i<32; i++)
{
if(foo[i]==1)
{
c++;
if(c%2) a=a+(1<<i);
else b=b+(1<<i);
}
}
cout<<a<<" "<<b<<endl;
}
return 0;
}
#define sc(a) scanf("%d",&a)
#define scd(a,b) scanf("%d%d",&a,&b)
#define sct(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define READ freopen ("input.txt","r",stdin)
#define nnn 20
using namespace std;
int main()
{
int num;
int a,b;
// scanf("%d",&n);
while(~sc(num)&&num)
{
bitset<32>foo(num);
// cout<<foo[0]<<" "<<foo[1]<<" "<<foo[2]<<endl;
// cout<<foo.size()<<endl;
// cout<<foo<<endl;
int c=0;
a=b=0;
for(int i=0; i<32; i++)
{
if(foo[i]==1)
{
c++;
if(c%2) a=a+(1<<i);
else b=b+(1<<i);
}
}
cout<<a<<" "<<b<<endl;
}
return 0;
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন