Untitled
unknown
plain_text
4 months ago
247 B
5
Indexable
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int count = 0; while(n) { if(n%2 == 1) { count++; } n = n>>1; } cout<<count<<endl; }
Editor is loading...
Leave a Comment