题目链接:https://www.nowcoder.com/practice/440f16e490a0404786865e99c6ad91c9?tpId=37&rp=1&ru=%2Fexam%2Foj%2Fta&qru=%2Fexam%2Foj%2Fta&sourceUrl=%2Fexam%2Foj%2Fta%3Fpage%3D1%26tpId%3D37%26type%3D37&difficulty=&judgeStatus=&tags=&title=&gioEnter=menu
题目如下:
#includeusing namespace std; int main(){ int n; cin>>n; int res=0; while(n){ int temp=n&1;//取最后一位 if(temp==1) res++; n=n>>1;//将数值右移一位 } cout<



