Task: | Arvonta |
Sender: | Kuha |
Submission time: | 2025-09-06 12:07:56 +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 ld long double using namespace std; ld pot(ld x, int k) { if (k == 0) return 1; if (k & 1) return x * pot(x, k - 1); ld u = pot(x, k / 2); return u * u; } int main() { int t; cin>>t; cout<<setprecision(10)<<fixed; for (int i = 0; i < t; i++) { int N; cin>>N; ld n = N; n = 1 / n; cout<<(1 - pot(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.0000000000 0.7500000000 0.7037037037 0.6835937500 0.6723200000 ... 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.0000000000 0.7500000000 0.7037037037 0.6835937500 0.6723200000 ... Truncated |