Cody

# Problem 1387. Points on a circle.

Solution 223792

Submitted on 26 Mar 2013
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
assert(isequal(circle_points(1),4))

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

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

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

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

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

Assertion failed.

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

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

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

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

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

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

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

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

15   Pass
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))

### Community Treasure Hunt

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

Start Hunting!