Task: | Arvonta |
Sender: | jlaire |
Submission time: | 2025-09-05 18:09:14 +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.00 s | 2 | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 7 | scanf("%d", &t); | ~~~~~^~~~~~~~~~ input/code.cpp:11:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 11 | scanf("%d", &n); | ~~~~~^~~~~~~~~~
Code
#include <math.h> #include <stdio.h> int main(void) { int t; scanf("%d", &t); for (int i=0; i<t; i++) { int n; scanf("%d", &n); printf("%.8f\n", 1 - pow((n-1.0)/n, 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 |