Cody

Solution 2077684

Submitted on 3 Jan 2020 by Nikolaos Nikolaou
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
n=10; e=10; s=10; w=10; t=2; y_correct=113.1371; assert(abs(total_distance(n,e,s,w,t)-y_correct)<1e-4)

m1 = 20 m2 = 20 m3 = 20 m4 = 20 s1 = 28.2843 s2 = 28.2843 s3 = 28.2843 s4 = 28.2843 p = 113.1371

2   Pass
n=15; e=7; s=3; w=15; t=1.5; y_correct=91.0185; assert(abs(total_distance(n,e,s,w,t)-y_correct)<1e-4)

m1 = 22.5000 m2 = 10.5000 m3 = 4.5000 m4 = 22.5000 s1 = 24.8294 s2 = 31.8198 s3 = 11.4237 s4 = 22.9456 p = 91.0185

3   Pass
n=11; e=21; s=31; w=41; t=1.7; y_correct=263.5003; assert(abs(total_distance(n,e,s,w,t)-y_correct)<1e-4)

m1 = 18.7000 m2 = 35.7000 m3 = 52.7000 m4 = 69.7000 s1 = 40.3011 s2 = 72.1649 s3 = 63.6536 s4 = 87.3807 p = 263.5003