Cody

Solution 2062441

Submitted on 18 Dec 2019 by Asif Newaz
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)

a = 20 b = 20 c = 20 d = 20 x1 = 28.2843 x2 = 28.2843 x3 = 28.2843 x4 = 28.2843 ans = 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)

a = 22.5000 b = 4.5000 c = 10.5000 d = 22.5000 x1 = 24.8294 x2 = 31.8198 x3 = 11.4237 x4 = 22.9456 ans = 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)

a = 18.7000 b = 52.7000 c = 35.7000 d = 69.7000 x1 = 40.3011 x2 = 72.1649 x3 = 63.6536 x4 = 87.3807 ans = 263.5003

Suggested Problems

More from this Author2