Problema Suma Gauss | www.pbinfo.ro

PHOTO EMBED

Tue Jun 13 2023 17:25:41 GMT+0000 (Coordinated Universal Time)

Saved by @takoma2elite #c++

​#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    long long rez;
    rez = 1LL * n * (n + 1) / 2;
    cout << rez;
    return 0;
}
content_copyCOPY

sume

https://www.pbinfo.ro/probleme/1360/suma-gauss