7 solutions

  • 0
    @ 2024-11-6 21:48:52
    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        long long n;
        cin>>n;
        cout<<(n+1)*n/2;
        return 0;
    }
    

    Information

    ID
    34
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    8
    Tags
    # Submissions
    2839
    Accepted
    413
    Uploaded By