Cody

# Problem 42836. Juggler sequence revisited

Solution 883495

Submitted on 27 Apr 2016 by Tim
• Size: 44
• This is the leading solution.
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
x = 3; l_correct = 6; h_correct = 36; [l h] = juggler(x); assert(isequal([l h],[l_correct h_correct]))

2   Pass
x = 5; l_correct = 5; h_correct = 36; [l h] = juggler(x); assert(isequal([l h],[l_correct h_correct]))

3   Pass
x = 10; l_correct = 7; h_correct = 36; [l h] = juggler(x); assert(isequal([l h],[l_correct h_correct]))

4   Pass
x = 77; l_correct = 19; h_correct = 2322378; [l h] = juggler(x); assert(isequal([l h],[l_correct h_correct]))

5   Pass
x = 99; l_correct = 11; h_correct = 37754276; [l h] = juggler(x); assert(isequal([l h],[l_correct h_correct]))

6   Pass
x = 117; l_correct = 11; h_correct = 44992; [l h] = juggler(x); assert(isequal([l h],[l_correct h_correct]))

7   Pass
x = 1; l_correct = 0; h_correct = 1; [l h] = juggler(x); assert(isequal([l h],[l_correct h_correct]))

8   Pass
x = 2; l_correct = 1; h_correct = 2; [l h] = juggler(x); assert(isequal([l h],[l_correct h_correct]))

### Community Treasure Hunt

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

Start Hunting!