| Task: | Arvonta |
| Sender: | sharph2 |
| Submission time: | 2025-09-05 18:13:08 +0300 |
| Language: | C++ (C++17) |
| 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.00 s | 2 | details |
Code
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
cin.sync_with_stdio(false);
cin.tie(nullptr);
int tc;
cin >> tc;
cout.precision(20);
for(int ti = 0; ti < tc; ++ti) {
int n;
cin >> n;
cout << 1.0 - std::pow(1.0 - 1.0 / (double)n, (double)n) << "\n";
}
return 0;
}
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 0.75 0.70370370370370360913 0.68359375 0.67231999999999991768 ... 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 0.75 0.70370370370370360913 0.68359375 0.67231999999999991768 ... Truncated |
