Cody

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

Solution 189537

Submitted on 11 Jan 2013 by James
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

``` ans = 0.5000 ```

2   Pass

``` ans = 0.3750 ```

3   Pass

``` ans = 0.3125 ```

4   Pass

``` ans = 0.2734 ```

5   Pass

``` ans = 0.2461 ```

6   Pass

``` ans = 0.2256 ```

7   Pass

``` ans = 0.1399 ```

8   Pass

``` ans = 0.1254 ```

9   Pass

``` ans = 0.1146 ```

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

``` ```

11   Pass

```[Warning: Result may not be exact. Coefficient is greater than 1.000000e+15 and is only accurate to 15 digits] [> In nchoosek at 64 In coin_head_match at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14] ans = 0.0993 ```

12   Pass
```[Warning: Result may not be exact. Coefficient is greater than 1.000000e+15 and is only accurate to 15 digits] [> In nchoosek at 64 In coin_head_match at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14] ans = 0.0704 ```