#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
ld n1 = n / 2, n2 = (n + 1) / 2;
ld ans = (n1 * (n1 - 1) + n2 * (n2 -1)) / 4.0;
cout << fixed << setprecision(6) << ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
1st numbers differ - expected: '100800.5000000000', found: '-0.0000000000', error = '1.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
1st numbers differ - expected: '1.0000000000', found: '-0.0000000000', error = '1.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
1st numbers differ - expected: '1.0000000000', found: '-0.0000000000', error = '1.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
1st numbers differ - expected: '100800.5000000000', found: '-0.0000000000', error = '1.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |