Cody

Problem 42670. If you prick us, do we not bleed?

Solution 767167

Submitted on 26 Oct 2015 by Binbin Qi
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
%% L=3; T=3; y_correct = 0.63661977236758; b=abs(Belonephobia(L,T)-y_correct) assert(b<1e-7)

b = 1.3323e-15

2   Pass
%% L=4; T=1; y_correct = 0.92000006671399; b=abs(Belonephobia(L,T)-y_correct) assert(b<1e-7)

b = 3.3307e-15

3   Pass
%% L=20; T=12; y_correct = 0.80254106139093; b=abs(Belonephobia(L,T)-y_correct) assert(b<1e-7)

b = 2.9976e-15

4   Pass
%% L=12; T=20; y_correct = 0.38197186342055; b=abs(Belonephobia(L,T)-y_correct) assert(b<1e-7)

b = 1.2212e-15

5   Pass
%% L=1; T=4; y_correct = 0.1591549430919; b=abs(Belonephobia(L,T)-y_correct) assert(b<1e-7)

b = 4.6629e-15

6   Pass
%% L=2; T=ceil(rand*10); y_correct=[0.83724842055825 0.63661977236758 0.42441318157839 0.31830988618379 0.25464790894703 0.21220659078919 0.18189136353359 0.15915494309190 0.14147106052613 0.12732395447352]; b=abs(Belonephobia(L,T)-y_correct(T)) assert(b<1e-7)

b = 2.5535e-15

7   Pass
%% L=ceil(rand*10); T=2; y_correct=[0.31830988618379 0.63661977236758 0.77860806073666 0.83724842055825 0.87089052216005 0.89287978884975 0.90841991082367 0.92000006671399 0.92896896682647 0.93612322320525]; b=abs(Belonephobia(L,T)-y_correct(L)) assert(b<1e-7)

b = 1.3323e-15