-
Notifications
You must be signed in to change notification settings - Fork 19
/
sol.cpp
35 lines (35 loc) · 921 Bytes
/
sol.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include<bits/stdc++.h>
#define int int64_t
#define pb push_back
#define endl '\n'
#define pll pair<int,int>
#define vll vector<int>
#define all(a) (a).begin(),(a).end()
#define x first
#define y second
#define sz(x) (int)x.size()
#define hell 1000000007
#define lbnd lower_bound
#define ubnd upper_bound
#define bs binary_search
#define mi map<int,int>
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ((a)*(b)) / gcd((a),(b))
#define rep(i,a,b) for(int i=a;i<b;i++)
#define ios ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
void solve(){
int n , sum = 0;
cin>>n;
if(n < 10) cout<<0<<endl;
else cout << (1LL * n * (n+1))/ 2 <<endl;
}
signed main(){
ios
int test=1;
//cin>>test;
while(test--){
solve();
}
return 0;
}