Cody

Problem 42835. Return the sequence element II

Solution 1539176

Submitted on 24 May 2018 by J. S. Kowontan
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))

Suggested Problems

More from this Author34

Community Treasure Hunt

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

Start Hunting!