1 solutions

  • 0
    @ 2024-11-26 22:42:06

    bitset的用法

    #include<bits/stdc++.h>
    using namespace std;
    const int N=1e5+9;
    
    int main()
    {
        int n;cin>>n;
        int cnt;
        int sum=1;
        for(int i=1;i<=n;++i)
        {
            cnt=bitset<32>(i).count();
            sum*=cnt;
        }
        
        cout<<sum;
        return 0;
    }
    ```
    
    
    ```
    • 1

    Information

    ID
    4909
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    10
    Tags
    (None)
    # Submissions
    2
    Accepted
    1
    Uploaded By