6 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
    2824
    Accepted
    410
    Uploaded By