Cody

# Problem 44817. Wrecked Angles?

Solution 2653868

Submitted on 5 Jul 2020
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   Fail
P=14; A=12; y=wrecked_angles(P,A); y_correct = 20.63495408493621; junk=abs(y-y_correct); assert(junk-1<1e-10);

ans = 19.634954084936208

Output argument "y" (and maybe others) not assigned during call to "wrecked_angles". Error in Test1 (line 3) y=wrecked_angles(P,A);

2   Fail
P=34; A=60; y=wrecked_angles(P,A); y_correct = 131.7322896141688; junk=abs(y-y_correct); assert(junk-1<1e-10);

ans = 1.327322896141688e+02

Output argument "y" (and maybe others) not assigned during call to "wrecked_angles". Error in Test2 (line 3) y=wrecked_angles(P,A);

3   Fail
P=62; A=168; y=wrecked_angles(P,A); y_correct = 590.8738521234052; junk=abs(y-y_correct); assert(junk-100<1e-10);

ans = 4.908738521234052e+02

Output argument "y" (and maybe others) not assigned during call to "wrecked_angles". Error in Test3 (line 3) y=wrecked_angles(P,A);

4   Fail
s1=100; totalsum=zeros(1,s1); for s2=1:s1 P=2*(s1+s2); A=s1*s2; totalsum(s2)=wrecked_angles(P,A); end s=sum(totalsum); s_correct=1051137.631982975; s_junk=abs(s-s_correct); assert(s_junk<1e-8); d=max(totalsum)-min(totalsum); d_correct=7853.196235811095; d_junk=abs(d-d_correct); assert(d_junk<1e-8);

ans = 7.854767032137880e+03

Output argument "y" (and maybe others) not assigned during call to "wrecked_angles". Error in Test4 (line 6) totalsum(s2)=wrecked_angles(P,A);

5   Fail
s1=wrecked_angles(32,64); s2=wrecked_angles(72,288); P=2*(s1+s2); A=s1*s2; y=wrecked_angles(P,A); y_correct=259088.4479405854; junk=abs(y-y_correct); assert(junk<1e-10);

ans = 1.005309649148734e+02

Output argument "y" (and maybe others) not assigned during call to "wrecked_angles". Error in Test5 (line 1) s1=wrecked_angles(32,64);