Cody

Problem 43179. Red and green towers

Solution 2042153

Submitted on 2 Dec 2019 by cokakola
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
n = 1; m_correct = 2; assert(isequal(towers(n),m_correct))

2   Pass
n = 2; m_correct = 5; assert(isequal(towers(n),m_correct))

3   Pass
n = 3; m_correct = 10; assert(isequal(towers(n),m_correct))

4   Pass
n = 15; m_correct = 4178; assert(isequal(towers(n),m_correct))

Suggested Problems

Community Treasure Hunt

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

Start Hunting!