Cody

Solution 933759

Submitted on 9 Aug 2016
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
alpha=0; n=1; p=1; D_correct=0; assert(abs(jumping_astronauts(alpha,p,n)-D_correct)<0.01)

D = 0

2   Pass
alpha=45; n=1; p=1; D_correct=0.5; assert(abs(jumping_astronauts(alpha,p,n)-D_correct)<0.01)

D = 0.5000

3   Pass
alpha=45; n=100; p=1; D_correct=50; assert(abs(jumping_astronauts(alpha,p,n)-D_correct)<0.01)

D = 0.5000 D = 1 D = 1.5000 D = 2 D = 2.5000 D = 3 D = 3.5000 D = 4 D = 4.5000 D = 5 D = 5.5000 D = 6 D = 6.5000 D = 7 D = 7.5000 D = 8 D = 8.5000 D = 9 D = 9.5000 D = 10 D = 10.5000 D = 11 D = 11.5000 D = 12 D = 12.5000 D = 13 D = 13.5000 D = 14 D = 14.5000 D = 15 D = 15.5000 D = 16 D = 16.5000 D = 17 D = 17.5000 D = 18 D = 18.5000 D = 19 D = 19.5000 D = 20 D = 20.5000 D = 21 D = 21.5000 D = 22 D = 22.5000 D = 23 D = 23.5000 D = 24 D = 24.5000 D = 25 D = 25.5000 D = 26 D = 26.5000 D = 27 D = 27.5000 D = 28 D = 28.5000 D = 29 D = 29.5000 D = 30 D = 30.5000 D = 31 D = 31.5000 D = 32 D = 32.5000 D = 33 D = 33.5000 D = 34 D = 34.5000 D = 35 D = 35.5000 D = 36 D = 36.5000 D = 37 D = 37.5000 D = 38 D = 38.5000 D = 39 D = 39.5000 D = 40 D = 40.5000 D = 41 D = 41.5000 D = 42 D = 42.5000 D = 43 D = 43.5000 D = 44 D = 44.5000 D = 45 D = 45.5000 D = 46 D = 46.5000 D = 47 D = 47.5000 D = 48 D = 48.5000 D = 49 D = 49.5000 D = 50

4   Fail
alpha=45; n=100; p=0.8; D_correct=3.32; assert(abs(jumping_astronauts(alpha,p,n)-D_correct)<0.01)

D = 1.5999e-10 D = 3.1998e-10 D = 4.7997e-10 D = 6.3995e-10 D = 7.9994e-10 D = 9.5993e-10 D = 1.1199e-09 D = 1.2799e-09 D = 1.4399e-09 D = 1.5999e-09 D = 1.7599e-09 D = 1.9199e-09 D = 2.0798e-09 D = 2.2398e-09 D = 2.3998e-09 D = 2.5598e-09 D = 2.7198e-09 D = 2.8798e-09 D = 3.0398e-09 D = 3.1998e-09 D = 3.3598e-09 D = 3.5197e-09 D = 3.6797e-09 D = 3.8397e-09 D = 3.9997e-09 D = 4.1597e-09 D = 4.3197e-09 D = 4.4797e-09 D = 4.6397e-09 D = 4.7997e-09 D = 4.9596e-09 D = 5.1196e-09 D = 5.2796e-09 D = 5.4396e-09 D = 5.5996e-09 D = 5.7596e-09 D = 5.9196e-09 D = 6.0796e-09 D = 6.2395e-09 D = 6.3995e-09 D = 6.5595e-09 D = 6.7195e-09 D = 6.8795e-09 D = 7.0395e-09 D = 7.1995e-09 D = 7.3595e-09 D = 7.5195e-09 D = 7.6794e-09 D = 7.8394e-09 D = 7.9994e-09 D = 8.1594e-09 D = 8.3194e-09 D = 8.4794e-09 D = 8.6394e-09 D = 8.7994e-09 D = 8.9594e-09 D = 9.1193e-09 D = 9.2793e-09 D = 9.4393e-09 D = 9.5993e-09 D = 9.7593e-09 D = 9.9193e-09 D = 1.0079e-08 D = 1.0239e-08 D = 1.0399e-08 D = 1.0559e-08 D = 1.0719e-08 D = 1.0879e-08 D = 1.1039e-08 D = 1.1199e-08 D = 1.1359e-08 D = 1.1519e-08 D = 1.1679e-08 D = 1.1839e-08 D = 1.1999e-08 D = 1.2159e-08 D = 1.2319e-08 D = 1.2479e-08 D = 1.2639e-08 D = 1.2799e-08 D = 1.2959e-08 D = 1.3119e-08 D = 1.3279e-08 D = 1.3439e-08 D = 1.3599e-08 D = 1.3759e-08 D = 1.3919e-08 D = 1.4079e-08 D = 1.4239e-08 D = 1.4399e-08 D = 1.4559e-08 D = 1.4719e-08 D = 1.4879e-08 D = 1.5039e-08 D = 1.5199e-08 D = 1.5359e-08 D = 1.5519e-08 D = 1.5679e-08 D = 1.5839e-08 D = 1.5999e-08

Assertion failed.

5   Fail
alpha=80; n=1000; p=0.95; D_correct=17.93; assert(abs(jumping_astronauts(alpha,p,n)-D_correct)<0.01)

D = 7.3888e-23 D = 1.4778e-22 D = 2.2166e-22 D = 2.9555e-22 D = 3.6944e-22 D = 4.4333e-22 D = 5.1721e-22 D = 5.9110e-22 D = 6.6499e-22 D = 7.3888e-22 D = 8.1277e-22 D = 8.8665e-22 D = 9.6054e-22 D = 1.0344e-21 D = 1.1083e-21 D = 1.1822e-21 D = 1.2561e-21 D = 1.3300e-21 D = 1.4039e-21 D = 1.4778e-21 D = 1.5516e-21 D = 1.6255e-21 D = 1.6994e-21 D = 1.7733e-21 D = 1.8472e-21 D = 1.9211e-21 D = 1.9950e-21 D = 2.0689e-21 D = 2.1427e-21 D = 2.2166e-21 D = 2.2905e-21 D = 2.3644e-21 D = 2.4383e-21 D = 2.5122e-21 D = 2.5861e-21 D = 2.6600e-21 D = 2.7338e-21 D = 2.8077e-21 D = 2.8816e-21 D = 2.9555e-21 D = 3.0294e-21 D = 3.1033e-21 D = 3.1772e-21 D = 3.2511e-21 D = 3.3250e-21 D = 3.3988e-21 D = 3.4727e-21 D = 3.5466e-21 D = 3.6205e-21 D = 3.6944e-21 D = 3.7683e-21 D = 3.8422e-21 D = 3.9161e-21 D = 3.9899e-21 D = 4.0638e-21 D = 4.1377e-21 D = 4.2116e-21 D = 4.2855e-21 D = 4.3594e-21 D = 4.4333e-21 D = 4.5072e-21 D = 4.5810e-21 D = 4.6549e-21 D = 4.7288e-21 D = 4.8027e-21 D = 4.8766e-21 D = 4.9505e-21 D = 5.0244e-21 D = 5.0983e-21 D = 5.1721e-21 D = 5.2460e-21 D = 5.3199e-21 D = 5.3938e-21 D = 5.4677e-21 D = 5.5416e-21 D = 5.6155e-21 D = 5.6894e-21 D = 5.7632e-21 D = 5.8371e-21 D = 5.9110e-21 D = 5.9849e-21 D = 6.0588e-21 D = 6.1327e-21 D = 6.2066e-21 D = 6.2805e-21 D = 6.3543e-21 D = 6.4282e-21 D = 6.5021e-21 D = 6.5760e-21 D = 6.6499e-21 D = 6.7238e-21 D = 6.7977e-21 D = 6.8716e-21 D = 6.9455e-21 D = 7.0193e-21 D = 7.0932e-21 D = 7.1671e-21 D = 7.2410e-21 D = 7.3149e-21 D = 7.3888e-21 D = 7.4627e-21 D = 7.5366e-21 D = 7.6104e-21 D = 7.6843e-21 D = 7.7582e-21 D = 7.8321e-21 D = 7.9060e-21 D = 7.9799e-21 D = 8.0538e-21 D = 8.1277e-21 D = 8.2015e-21 D = 8.2754e-21 D = 8.3493e-21 D = 8.4232e-21 D = 8.4971e-21 D = 8.5710e-21 D = 8.6449e-21 D = 8.7188e-21 D = 8.7926e-21 D = 8.8665e-21 D = 8.9404e-21 D = 9.0143e-21 D = 9.0882e-21 D = 9.1621e-21 D = 9.2360e-21 D = 9.3099e-21 D = 9.3837e-21 D = 9.4576e-21 D = 9.5315e-21 D = 9.6054e-21 D = 9.6793e-21 D = 9.7532e-21 D = 9.8271e-21 D = 9.9010e-21 D = 9.9749e-21 D = 1.0049e-20 D = 1.0123e-20 D = 1.0197e-20 D = 1.0270e-20 D = 1.0344e-20 D = 1.0418e-20 D = 1.0492e-20 D = 1.0566e-20 D = 1.0640e-20 D = 1.0714e-20 D = 1.0788e-20 D = 1.0862e-20 D = 1.0935e-20 D = 1.1009e-20 D = 1.1083e-20 D = 1.1157e-20 D = 1.1231e-20 D = 1.1305e-20 D = 1.1379e-20 D = 1.1453e-20 D = 1.1526e-20 D = 1.1600e-20 D = 1.1674e-20 D = 1.1748e-20 D = 1.1822e-20 D = 1.1896e-20 D = 1.1970e-20 D = 1.2044e-20 D = 1.2118e-20 D = 1.2191e-20 D = 1.2265e-20 D = 1.2339e-20 D = 1.2413e-20 D = 1.2487e-20 D = 1.2561e-20 D = 1.2635e-20 D = 1.2709e-20 D = 1.2783e-20 D = 1.2856e-20 D = 1.2930e-20 D = 1.3004e-20 D = 1.3078e-20 D = 1.3152e-20 D = 1.3226e-20 D = 1.3300e-20 D = 1.3374e-20 D = 1.3448e-20 D = 1.3521e-20 D = 1.3595e-20 D = 1.3669e-20 D = 1.3743e-20 D = 1.3817e-20 D = 1.3891e-20 D = 1.3965e-20 D = 1.4039e-20 D = 1.4113e-20 D = 1.4186e-20 D = 1.4260e-20 D = 1.4334e-20 D = 1.4408e-20 D = 1.4482e-20 D = 1.4556e-20 D = 1.4630e-20 D = 1.4704e-20 D = 1.4778e-20 D = 1.4851e-20 D = 1.4925e-20 D = 1.4999e-20 D = 1.5073e-20 D = 1.5147e-20 D = 1.5221e-20 D = 1.5295e-20 D = 1.5369e-20 D = 1.5443e-20 D = 1.5516e-20 D = 1.5590e-20 D = 1.5664e-20 D = 1.5738e-20 D = 1.5812e-20 D = 1.5886e-20 D = 1.5960e-20 D = 1.6034e-20 D = 1.6108e-20 D = 1.6181e-20 D = 1.6255e-20 D = 1.6329e-20 D = 1.6403e-20 D = 1.6477e-20 D = 1.6551e-20 D = 1.6625e-20 D = 1.6699e-20 D = 1.6773e-20 D = 1.6846e-20 D = 1.6920e-20 D = 1.6994e-20 D = 1.7068e-20 D = 1.7142e-20 D = 1.7216e-20 D = 1.7290e-20 D = 1.7364e-20 D = 1.7438e-20 D = 1.7511e-20 D = 1.7585e-20 D = 1.7659e-20 D = 1.7733e-20 D = 1.7807e-20 D = 1.7881e-20 D = 1.7955e-20 D = 1.8029e-20 D = 1.8103e-20 D = 1.8176e-20 D = 1.8250e-20 D = 1.8324e-20 D = 1.8398e-20 D = 1.8472e-20 D = 1.8546e-20 D = 1.8620e-20 D = 1.8694e-20 D = 1.8767e-20 D = 1.8841e-20 D = 1.8915e-20 D = 1.8989e-20 D = 1.9063e-20 D = 1.9137e-20 D = 1.9211e-20 D = 1.9285e-20 D = 1.9359e-20 D = 1.9432e-20 D = 1.9506e-20 D = 1.9580e-20 D = 1.9654e-20 D = 1.9728e-20 D = 1.9802e-20 D = 1.9876e-20 D = 1.9950e-20 D = 2.0024e-20 D = 2.0097e-20 D = 2.0171e-20 D = 2.0245e-20 D = 2.0319e-20 D = 2.0393e-20 D = 2.0467e-20 D = 2.0541e-20 D = 2.0615e-20 D = 2.0689e-20 D = 2.0762e-20 D = 2.0836e-20 D = 2.0910e-20 D = 2.0984e-20 D = 2.1058e-20 D = 2.1132e-20 D = 2.1206e-20 D = 2.1280e-20 D = 2.1354e-20 D = 2.1427e-20 D = 2.1501e-20 D = 2.1575e-20 D = 2.1649e-20 D = 2.1723e-20 D = 2.1797e-20 D = 2.1871e-20 D = 2.1945e-20 D = 2.2019e-20 D = 2.2092e-20 D = 2.2166e-20 D = 2.2240e-20 D = 2.2314e-20 D = 2.2388e-20 D = 2.2462e-20 D = 2.2536e-20 D = 2.2610e-20 D = 2.2684e-20 D = 2.2757e-20 D = 2.2831e-20 D = 2.2905e-20 D = 2.2979e-20 D = 2.3053e-20 D = 2.3127e-20 D = 2.3201e-20 D = 2.3275e-20 D = 2.3349e-20 D = 2.3422e-20 D = 2.3496e-20 D = 2.3570e-20 D = 2.3644e-20 D = 2.3718e-20 D = 2.3792e-20 D = 2.3866e-20 D = 2.3940e-20 D = 2.4014e-20 D = 2.4087e-20 D = 2.4161e-20 D = 2.4235e-20 D = 2.4309e-20 D = 2.4383e-20 D = 2.4457e-20 D = 2.4531e-20 D = 2.4605e-20 D = 2.4679e-20 D = 2.4752e-20 D = 2.4826e-20 D = 2.4900e-20 D = 2.4974e-20 D = 2.5048e-20 D = 2.5122e-20 D = 2.5196e-20 D = 2.5270e-20 D = 2.5344e-20 D = 2.5417e-20 D = 2.5491e-20 D = 2.5565e-20 D = 2.5639e-20 D = 2.5713e-20 D = 2.5787e-20 D = 2.5861e-20 D = 2.5935e-20 D = 2.6009e-20 D = 2.6082e-20 D = 2.6156e-20 D = 2.6230e-20 D = 2.6304e-20 D = 2.6378e-20 D = 2.6452e-20 D = 2.6526e-20 D = 2.6600e-20 D = 2.6673e-20 D = 2.6747e-20 D = 2.6821e-20 D = 2.6895e-20 D = 2.6969e-20 D = 2.7043e-20 D = 2.7117e-20 D = 2.7191e-20 D = 2.7265e-20 D = 2.7338e-20 D = 2.7412e-20 D = 2.7486e-20 D = 2.7560e-20 D = 2.7634e-20 D = 2.7708e-20 D = 2.7782e-20 D = 2.7856e-20 D = 2.7930e-20 D = 2.8003e-20 D = 2.8077e-20 D = 2.8151e-20 D = 2.8225e-20 D = 2.8299e-20 D = 2.8373e-20 D = 2.8447e-20 D = 2.8521e-20 D = 2.8595e-20 D = 2.8668e-20 D = 2.8742e-20 D = 2.8816e-20 D = 2.8890e-20 D = 2.8964e-20 D = 2.9038e-20 D = 2.9112e-20 D = 2.9186e-20 D = 2.9260e-20 D = 2.9333e-20 D = 2.9407e-20 D = 2.9481e-20 D = 2.9555e-20 D = 2.9629e-20 D = 2.9703e-20 D = 2.9777e-20 D = 2.9851e-20 D = 2.9925e-20 D = 2.9998e-20 D = 3.0072e-20 D = 3.0146e-20 D = 3.0220e-20 D = 3.0294e-20 D = 3.0368e-20 D = 3.0442e-20 D = 3.0516e-20 D = 3.0590e-20 D = 3.0663e-20 D = 3.0737e-20 D = 3.0811e-20 D = 3.0885e-20 D = 3.0959e-20 D = 3.1033e-20 D = 3.1107e-20 D = 3.1181e-20 D = 3.1255e-20 D = 3.1328e-20 D = 3.1402e-20 D = 3.1476e-20 D = 3.1550e-20 D = 3.1624e-20 D = 3.1698e-20 D = 3.1772e-20 D = 3.1846e-20 D = 3.1920e-20 D = 3.1993e-20 D = 3.2067e-20 D = 3.2141e-20 D = 3.2215e-20 D = 3.2289e-20 D = 3.2363e-20 D = 3.2437e-20 D = 3.2511e-20 D = 3.2585e-20 D = 3.2658e-20 D = 3.2732e-20 D = 3.2806e-20 D = 3.2880e-20 D = 3.2954e-20 D = 3.3028e-20 D = 3.3102e-20 D = 3.3176e-20 D = 3.3250e-20 D = 3.3323e-20 D = 3.3397e-20 D = 3.3471e-20 D = 3.3545e-20 D = 3.3619e-20 D = 3.3693e-20 D = 3.3767e-20 D = 3.3841e-20 D = 3.3914e-20 D = 3.3988e-20 D = 3.4062e-20 D = 3.4136e-20 D = 3.4210e-20 D = 3.4284e-20 D = 3.4358e-20 D = 3.4432e-20 D = 3.4506e-20 D = 3.4579e-20 D = 3.4653e-20 D = 3.4727e-20 D = 3.4801e-20 D = 3.4875e-20 D = 3.4949e-20 D = 3.5023e-20 D = 3.5097e-20 D = 3.5171e-20 D = ...

Assertion failed.

Suggested Problems

More from this Author9