Cody

Problem 42803. Britney unfolded

Solution 877718

Submitted on 19 Apr 2016 by James
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 = 3; t = 0.15; L_correct = 7; f_correct = 7; [L,f] = Britney_Unfolded(n,t) assert(isequal([L,f],[L_correct,f_correct]))

f = 7 L = 7 L = 7 f = 7

2   Pass
n = 6; t = 0.02; L_correct = 45; f_correct = 63; [L,f] = Britney_Unfolded(n,t) assert(isequal([L,f],[L_correct,f_correct]))

f = 63 L = 45 L = 45 f = 63

3   Pass
n = 7; t = 0.05; L_correct = 439; f_correct = 127; [L,f] = Britney_Unfolded(n,t) assert(isequal([L,f],[L_correct,f_correct]))

f = 127 L = 439 L = 439 f = 127

4   Pass
n = 10; t = 0.29; L_correct = 159686; f_correct = 1023; [L,f] = Britney_Unfolded(n,t) assert(isequal([L,f],[L_correct,f_correct]))

f = 1023 L = 159686 L = 159686 f = 1023

5   Pass
n = 12; t = 0.06; L_correct = 527458; f_correct = 4095; [L,f] = Britney_Unfolded(n,t) assert(isequal([L,f],[L_correct,f_correct]))

f = 4095 L = 527458 L = 527458 f = 4095

Community Treasure Hunt

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

Start Hunting!