提交时间:2020-08-23 18:40:11
运行 ID: 6004
#include<bits/stdc++.h> using namespace std; int main(){ int n,b,sum1=0,sum0=0; cin>>n; for(int i=0;i<=n-1;i++){ cin>>b; while(b){ if(b%2==0) sum0++; else sum1++; b/=2; } cout<<sum1<<' '<<sum0<<endl; sum1=0; sum0=0; } }