Cody

# Problem 1387. Points on a circle.

Solution 2971375

Submitted on 20 Sep 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
assert(isequal(circle_points(1),4))

ans = 1

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test1 (line 1) assert(isequal(circle_points(1),4))

2   Fail
assert(isequal(circle_points(3),4))

ans = 9

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test2 (line 1) assert(isequal(circle_points(3),4))

3   Fail
assert(isequal(circle_points(5),12))

ans = 25

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test3 (line 1) assert(isequal(circle_points(5),12))

4   Fail
assert(isequal(circle_points(65),36))

ans = 4225

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test4 (line 1) assert(isequal(circle_points(65),36))

5   Fail
assert(isequal(circle_points(64090),324))

ans = 4.1075e+09

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test5 (line 1) assert(isequal(circle_points(64090),324))

6   Fail
assert(isequal(circle_points(326441),12))

ans = 1.0656e+11

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test6 (line 1) assert(isequal(circle_points(326441),12))

7   Fail
assert(isequal(circle_points(359125),420))

ans = 1.2897e+11

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test7 (line 1) assert(isequal(circle_points(359125),420))

8   Fail
assert(isequal(circle_points(1000001),36))

ans = 1.0000e+12

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test8 (line 1) assert(isequal(circle_points(1000001),36))

9   Fail
assert(isequal(circle_points(2417899275),20))

ans = 5.8462e+18

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test9 (line 1) assert(isequal(circle_points(2417899275),20))

10   Fail
assert(isequal(circle_points(31432690549),8748))

ans = 9.8801e+20

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test10 (line 1) assert(isequal(circle_points(31432690549),8748))

11   Fail
assert(isequal(circle_points(11472932050385),78732))

ans = 1.3163e+26

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test11 (line 1) assert(isequal(circle_points(11472932050385),78732))

12   Fail
assert(isequal(circle_points(1021090952484265),236196))

ans = 1.0426e+30

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test12 (line 1) assert(isequal(circle_points(1021090952484265),236196))

13   Fail
assert(isequal(circle_points(6095127531752228),78732))

ans = 3.7151e+31

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test13 (line 1) assert(isequal(circle_points(6095127531752228),78732))

14   Fail
assert(isequal(circle_points(5*circle_points(630209)),12))

ans = 3.9716e+11

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test14 (line 1) assert(isequal(circle_points(5*circle_points(630209)),12))

15   Fail
y=arrayfun(@(x) circle_points(x),1000:2000); [m1,m2]=max(y); assert(isequal(m1-m2,2)); [h1,h2]=hist(y,unique(y)); assert(isequal(prod(h1-h2),1399066124544000))

ans = 1000000

Output argument "y" (and maybe others) not assigned during call to "circle_points". Error in Test15>@(x)circle_points(x) (line 1) y=arrayfun(@(x) circle_points(x),1000:2000); Error in Test15 (line 1) y=arrayfun(@(x) circle_points(x),1000:2000);

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!