| Task: | Arvonta |
| Sender: | Laakeri |
| Submission time: | 2025-09-06 18:43:15 +0300 |
| Language: | C++ (C++11) |
| 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>
#define F first
#define S second
typedef long long ll;
typedef long double ld;
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin>>t;
cout<<setprecision(20);
for (int i=0;i<t;i++){
ld n;
cin>>n;
cout<<(ld)1-powl((ld)1-(ld)1/n, n)<<endl;
}
}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.70370370370370370378 0.68359375 0.67231999999999999997 ... 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.70370370370370370378 0.68359375 0.67231999999999999997 ... Truncated |
