Advertisement
Josif_tepe

Untitled

Dec 23rd, 2022
1,088
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <set>
  4. #include <cstring>
  5. using namespace std;
  6.  
  7. int main() {
  8.     int n;
  9.     cin >> n;
  10.    
  11.     cout << __builtin_popcount(n) << endl;
  12.     return 0;
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement