Cody

Solution 287970

Submitted on 23 Jul 2013 by Evan
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
%% r=138;p=844;rings=3; assert(isequal(solve_rings(r,p),rings))

p = 567 p = 286 p = 1 p = -288

2   Pass
%% r=21;p=197;rings=4; assert(isequal(solve_rings(r,p),rings))

p = 154 p = 107 p = 56 p = 1 p = -58

3   Pass
%% r=214;p=862;rings=2; assert(isequal(solve_rings(r,p),rings))

p = 433 p = 0

4   Pass
%% r=20;p=845;rings=13; assert(isequal(solve_rings(r,p),rings))

p = 804 p = 759 p = 710 p = 657 p = 600 p = 539 p = 474 p = 405 p = 332 p = 255 p = 174 p = 89 p = 0

5   Pass
%% r=20;p=844;rings=12; assert(isequal(solve_rings(r,p),rings))

p = 803 p = 758 p = 709 p = 656 p = 599 p = 538 p = 473 p = 404 p = 331 p = 254 p = 173 p = 88 p = -1