#include<stdio.h>
unsigned _int64 jinzhi(unsigned _int64 n);
int main()
{
long n;
scanf("%ld",&n);
printf("%I64u",jinzhi(n));
return 0;
}
unsigned _int64 jinzhi(unsigned _int64 n)
{
unsigned _int64 result=0;
long t;
if(n==1)
result=1;
else
{
t=n%2;
result=t+10*jinzhi(n/2);
}
return result;
}
//_int64是64位整数,比long范围大。这样可以勉强解决,但你返回值用数值始终存在隐患,超过_int64的数值范围又会出现不正常的结果。这种题最好用字串接受执行结果