#include<stdio.h>
int main()
{
int time,n,i;
scanf("%d",&time);
while(time--){
scanf("%d",&n);
i = 0;
while(n != 0){
if(n % 2 )
{
printf("%d",i);
if(n / 2) printf(" ");
else printf("\n");
}
i++;
n = n / 2;
}
}
return 0;
}
zoj 1383 Binary Numbers
最新推荐文章于 2020-06-06 18:26:58 发布