#include<stdio.h>
int main()
{
int a,i;
while (scanf("%d",&a) != EOF)
{
int b[100]={0};
if (a == 0)
{
printf("%d\n",a);
continue;
}
b[0] = a%2;
i=1;
while (a != 0)
{
a = a/2;
b[i]=a%2;
i++;
}
for (;;i--)
{
if (b[i] == 1)
break;
}
for (; i>=0; i--)
{
printf ("%d",b[i]);
}
printf("\n");
}
return 0;
}
队花的烦恼一
最新推荐文章于 2021-12-19 17:10:00 发布