#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,c;
// scanf("%d",&n);
while(~sc(num)&&num)
{
a=b=c=0;
for(int i=0; i<32; i++)
{
if((num&(1<<i)))
{
c++;
if(c%2) a+=(1<<i);
else 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,c;
// scanf("%d",&n);
while(~sc(num)&&num)
{
a=b=c=0;
for(int i=0; i<32; i++)
{
if((num&(1<<i)))
{
c++;
if(c%2) a+=(1<<i);
else b+=(1<<i);
}
}
cout<<a<<" "<<b<<endl;
}
return 0;
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন