4 solutions

  • 0
    @ 2026-10-17 11:10:08
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n,c;
        cin>>n;
        c=n;
        bitset<32> a(n);
        
        cout<<a.count();
        return 0;
    }
    

    Information

    ID
    123
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    84
    Accepted
    43
    Uploaded By