- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
Latest commit
73 lines (64 loc) · 1.68 KB
/
Copy pathtest.cpp
File metadata and controls
73 lines (64 loc) · 1.68 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include<bits/stdc++.h>
#defineendl'\n'
#definesqr(x) (x) * (x)
#definegcd(x,y) __gcd(x,y)
// #define lcm(x,y) ((x/gcd(x,y)) * y)
#definesz(x) (int)x.size()
#defineall(x) (x).begin(),(x).end()
#definerall(x) (x).rbegin(),(x).rend()
#defineprec(x) fixed<<setprecision(x)
#definemin3(a,b,c) min(a,min(b,c))
#definemax3(a,b,c) max(a,max(b,c))
#definemin4(a,b,c,d) min(a,min(b,min(c,d)))
#definemax4(a,b,c,d) max(a,max(b,max(c,d)))
#defineunsyncIOios_base::sync_with_stdio(false); cin.tie(nullptr)
usingnamespacestd;
using ll = longlong;
using db = double;
using ld = longdouble;
using ull = unsignedlonglong;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const ld PI = acos((ld) - 1);
constintMOD = 1e9 + 7;
const ll INF = 2e18 + 1;
const ld EPS = 1e-9;
constintMX = 2e6;
#ifdef LOCAL
#definedebug(...) __f(#__VA_ARGS__, __VA_ARGS__)
template < typename Arg1 >
void__f(constchar* name, Arg1&& arg1) {
cerr << name << " = " << arg1 << endl;
}
template < typename Arg1, typename... Args>
void__f(constchar* names, Arg1&& arg1, Args&&... args) {
constchar* comma = strchr(names + 1, ',');
cerr.write(names, comma - names) << " = " << arg1 << " | ";
__f(comma + 1, args...);
}
#else
#definedebug(...)
#endif
voidsolve() {
int n; cin >> n;
ll ans = 0;
for (int i = 1; i <= n; i++) {
ans += i;
}
cout << ans << endl;
}
intmain() {
#ifdef LOCAL
clock_t tStart = clock();
#endif
unsyncIO;
freopen("out2.txt", "w", stdout);
int t = 1; //cin >> t;
while (t--) {
solve();
}
#ifdef LOCAL
cerr << "\nRuntime: " << (ld) (clock() - tStart) / CLOCKS_PER_SEC << " Seconds" << endl;
#endif
return0;
}