Skip to content

Commit 9abf4e2

Browse files
committed
atcoder/abc003A
1 parent 4a52ed3 commit 9abf4e2

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

atcoder/abc003/A/main.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include <bits/stdc++.h>
2+
3+
using namespace std;
4+
using ll = int64_t;
5+
using ff = long double;
6+
7+
int main() {
8+
ios_base::sync_with_stdio(false);
9+
cin.tie(0); cout.tie(0);
10+
11+
int X;
12+
cin >> X;
13+
14+
int S = 0;
15+
for (int i = 1; i <= X; ++i) {
16+
S += i;
17+
}
18+
cout << fixed << setprecision(7) << (ll(S) * 10000 / ff(X)) << endl;
19+
20+
return 0;
21+
}

0 commit comments

Comments
 (0)