Cody

# Problem 42836. Juggler sequence revisited

Solution 1028877

Submitted on 24 Oct 2016
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
x = 3; l_correct = 6; h_correct = 36; [l h] = juggler(x); assert(isequal([l h],[l_correct h_correct]))

Undefined function or variable 'a'. Error in juggler (line 5) x=floor(power(a,.5+rem(x,2))); Error in TestPoint1 (line 4) [l h] = juggler(x);

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

Undefined function or variable 'a'. Error in juggler (line 5) x=floor(power(a,.5+rem(x,2))); Error in TestPoint2 (line 4) [l h] = juggler(x);

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

Undefined function or variable 'a'. Error in juggler (line 5) x=floor(power(a,.5+rem(x,2))); Error in TestPoint3 (line 4) [l h] = juggler(x);

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

Undefined function or variable 'a'. Error in juggler (line 5) x=floor(power(a,.5+rem(x,2))); Error in TestPoint4 (line 4) [l h] = juggler(x);

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

Undefined function or variable 'a'. Error in juggler (line 5) x=floor(power(a,.5+rem(x,2))); Error in TestPoint5 (line 4) [l h] = juggler(x);

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

Undefined function or variable 'a'. Error in juggler (line 5) x=floor(power(a,.5+rem(x,2))); Error in TestPoint6 (line 4) [l h] = juggler(x);

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

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

Undefined function or variable 'a'. Error in juggler (line 5) x=floor(power(a,.5+rem(x,2))); Error in TestPoint8 (line 4) [l h] = juggler(x);