#include "iostream"
using namespace std;
int main()
{
int TestCase;
while (cin >> TestCase)
{
while (TestCase--)
{
int Num, i = 0, temp, flag = 0;
cin >> Num;
while (1)
{
temp = Num % 2;
Num /= 2;
if (temp != 0)
{
if (flag == 0)
cout << i;
else
{
cout << " " << i;
}
flag = 1;
}
if (Num == 0)
break;
i++;
}
cout << endl;
}
}
}
zoj 1383 Binary Numbers
最新推荐文章于 2020-06-06 18:26:58 发布