Cody

# Problem 1159. Coin Tossing: Probability of Same Heads for N tosses

Solution 1678342

Submitted on 21 Nov 2018 by Martin C.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass

P = 0 a = 0.5000 P = 0.2500 a = 0.5000 P = 0.5000

2   Pass

P = 0 a = 0.2500 P = 0.0625 a = 0.5000 P = 0.3125 a = 0.2500 P = 0.3750

3   Pass

P = 0 a = 0.1250 P = 0.0156 a = 0.3750 P = 0.1562 a = 0.3750 P = 0.2969 a = 0.1250 P = 0.3125

4   Pass

P = 0 a = 0.0625 P = 0.0039 a = 0.2500 P = 0.0664 a = 0.3750 P = 0.2070 a = 0.2500 P = 0.2695 a = 0.0625 P = 0.2734

5   Pass

P = 0 a = 0.0312 P = 9.7656e-04 a = 0.1562 P = 0.0254 a = 0.3125 P = 0.1230 a = 0.3125 P = 0.2207 a = 0.1562 P = 0.2451 a = 0.0312 P = 0.2461

6   Pass

P = 0 a = 0.0156 P = 2.4414e-04 a = 0.0938 P = 0.0090 a = 0.2344 P = 0.0640 a = 0.3125 P = 0.1616 a = 0.2344 P = 0.2166 a = 0.0938 P = 0.2253 a = 0.0156 P = 0.2256

7   Pass

P = 0 a = 1.5259e-05 P = 2.3283e-10 a = 2.4414e-04 P = 5.9837e-08 a = 0.0018 P = 3.4126e-06 a = 0.0085 P = 7.6428e-05 a = 0.0278 P = 8.4766e-04 a = 0.0667 P = 0.0053 a = 0.1222 P = 0.0202 a = 0.1746 P = 0.0507 a = 0.1964 P = 0.0893 a = 0.1746 P = 0.1197 a = 0.1222 P = 0.1347 a = 0.0667 P = 0.1391 a = 0.0278 P = 0.1399 a = 0.0085 P = 0.1399 a = 0.0018 P = 0.1399 a = 2.4414e-04 P = 0.1399 a = 1.5259e-05 P = 0.1399

8   Pass

P = 0 a = 9.5367e-07 P = 9.0949e-13 a = 1.9073e-05 P = 3.6471e-10 a = 1.8120e-04 P = 3.3197e-08 a = 0.0011 P = 1.2152e-06 a = 0.0046 P = 2.2565e-05 a = 0.0148 P = 2.4118e-04 a = 0.0370 P = 0.0016 a = 0.0739 P = 0.0071 a = 0.1201 P = 0.0215 a = 0.1602 P = 0.0472 a = 0.1762 P = 0.0782 a = 0.1602 P = 0.1039 a = 0.1201 P = 0.1183 a = 0.0739 P = 0.1238 a = 0.0370 P = 0.1251 a = 0.0148 P = 0.1253 a = 0.0046 P = 0.1254 a = 0.0011 P = 0.1254 a = 1.8120e-04 P = 0.1254 a = 1.9073e-05 P = 0.1254 a = 9.5367e-07 P = 0.1254

9   Pass

P = 0 a = 5.9605e-08 P = 3.5527e-15 a = 1.4305e-06 P = 2.0499e-12 a = 1.6451e-05 P = 2.7268e-10 a = 1.2064e-04 P = 1.4827e-08 a = 6.3336e-04 P = 4.1597e-07 a = 0.0025 P = 6.8343e-06 a = 0.0080 P = 7.1196e-05 a = 0.0206 P = 4.9677e-04 a = 0.0438 P = 0.0024 a = 0.0779 P = 0.0085 a = 0.1169 P = 0.0222 a = 0.1488 P = 0.0443 a = 0.1612 P = 0.0703 a = 0.1488 P = 0.0924 a = 0.1169 P = 0.1061 a = 0.0779 P = 0.1121 a = 0.0438 P = 0.1141 a = 0.0206 P = 0.1145 a = 0.0080 P = 0.1146 a = 0.0025 P = 0.1146 a = 6.3336e-04 P = 0.1146 a = 1.2064e-04 P = 0.1146 a = 1.6451e-05 P = 0.1146 a = 1.4305e-06 P = 0.1146 a = 5.9605e-08 P = 0.1146

10   Pass
assert(~isequal(1,2))

11   Pass