Submission details
Task:Arvonta
Sender:tykkipeli
Submission time:2025-09-05 18:19:12 +0300
Language:C++ (C++20)
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED37
#2ACCEPTED63
Test results
testverdicttimegroup
#1ACCEPTED0.00 s1, 2details
#2ACCEPTED0.01 s2details

Code

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;


int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t;
    cin >> t;
    for (int i = 0; i < t; i++) {
        ld n;
        cin >> n;
        ld prod = 1;
        for (int j = 0; j < n; j++) {
            prod *= (n-1)/n;
        }
        cout << setprecision(20) << 1 - prod << "\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
0.75
0.70370370370370370367
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.70370370370370370367
0.68359375
0.67231999999999999997
...
Truncated