Cody

# Problem 42835. Return the sequence element II

Solution 883463

Submitted on 27 Apr 2016 by HH
• Size: 27
• 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; n = 5; y_correct = 6; assert(isequal(juggler(x,n),y_correct))

2   Pass
x = 33; n = 3; y_correct = 2598; assert(isequal(juggler(x,n),y_correct))

3   Pass
x = 45; n = 4; y_correct = 72; assert(isequal(juggler(x,n),y_correct))

4   Pass
x = 163; n = 23; y_correct = 333; assert(isequal(juggler(x,n),y_correct))

5   Pass
x = 37; n = 13; y_correct = 34276462; assert(isequal(juggler(x,n),y_correct))

6   Pass
x = 37; n = 18; y_correct = 1; assert(isequal(juggler(x,n),y_correct))

7   Pass
x = 37; n = 99; y_correct = 1; assert(isequal(juggler(x,n),y_correct))

### Community Treasure Hunt

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

Start Hunting!