Cody

# Problem 44711. Toads and Frogs Puzzle 2

Solution 2848029

Submitted on 18 Aug 2020 by Alfonso Nieto-Castanon
• Size: 23
• 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
[jump,slide] = ToadsFrogs2(0); assert(isequal(jump,0)&isequal(slide,0))

2   Pass
[jump,slide] = ToadsFrogs2(1); assert(isequal(jump,4)&isequal(slide,8))

3   Pass
[jump,slide] = ToadsFrogs2(3); assert(isequal(jump,72)&isequal(slide,48))

4   Pass
[jump,slide] = ToadsFrogs2(7); assert(isequal(jump,784)&isequal(slide,224))

5   Pass
[jump,slide] = ToadsFrogs2(11); assert(isequal(jump,2904)&isequal(slide,528))

6   Pass
[jump,slide] = ToadsFrogs2(17); assert(isequal(jump,10404)&isequal(slide,1224))

7   Pass
[jump,slide] = ToadsFrogs2(23); assert(isequal(jump,25392)&isequal(slide,2208))

8   Pass
[jump,slide] = ToadsFrogs2(29); assert(isequal(jump,50460)&isequal(slide,3480))

9   Pass
[jump,slide] = ToadsFrogs2(41); assert(isequal(jump,141204)&isequal(slide,6888))

10   Pass
[jump,slide] = ToadsFrogs2(50); assert(isequal(jump,255000)&isequal(slide,10200))

11   Pass
[jump,slide] = ToadsFrogs2(75); assert(isequal(jump,855000)&isequal(slide,22800))

12   Pass
[jump,slide] = ToadsFrogs2(99); assert(isequal(jump,1960200)&isequal(slide,39600))

### Community Treasure Hunt

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

Start Hunting!