| Task: | Arvonta |
| Sender: | ollpu |
| Submission time: | 2025-09-05 18:36:44 +0300 |
| Language: | C++ (C++20) |
| Status: | READY |
| Result: | 100 |
| group | verdict | score |
|---|---|---|
| #1 | ACCEPTED | 37 |
| #2 | ACCEPTED | 63 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | ACCEPTED | 0.00 s | 1, 2 | details |
| #2 | ACCEPTED | 0.01 s | 2 | details |
Code
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int T;
cin >> T;
for (int Ti = 0; Ti < T; ++Ti) {
int n;
cin >> n;
double res = 1.0;
for (int i = 0; i < n; ++i) {
res *= double(n-1) / n;
}
res = 1 - res;
cout << fixed << setprecision(8) << res << "\n";
}
}
Test details
Test 1
Group: 1, 2
Verdict: ACCEPTED
| input |
|---|
| 10 1 2 3 4 ... |
| correct output |
|---|
| 1.0 0.75 0.7037037037 0.68359375 0.67232 ... |
| user output |
|---|
| 1.00000000 0.75000000 0.70370370 0.68359375 0.67232000 ... Truncated |
Test 2
Group: 2
Verdict: ACCEPTED
| input |
|---|
| 1000 1 2 3 4 ... |
| correct output |
|---|
| 1.0 0.75 0.7037037037 0.68359375 0.67232 ... |
| user output |
|---|
| 1.00000000 0.75000000 0.70370370 0.68359375 0.67232000 ... Truncated |
