标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3820 Accepted Submission(s):
2321
1 #include <iostream> 2 using namespace std; 3 int main(int argc, char const *argv[]) 4 { 5 int T; 6 cin>>T; 7 while(T--) 8 { 9 int n,i=0,j,k,flag=0; 10 cin>>n; 11 while(n) 12 { 13 if(n%2==1) 14 { 15 cout<<i; 16 if(n>=2) 17 cout<<‘ ‘; 18 } 19 i++; 20 n/=2; 21 } 22 cout<<endl; 23 } 24 }
标签:
原文地址:http://www.cnblogs.com/a1225234/p/4683262.html