Problem 42803. Britney unfolded
You have a long, narrow strip of paper. You are going to fold this strip of paper length-wise in half, than fold the folded strip length-wise in half again, and repeat this process until it is no longer possible to do so.
You then unfold the strip of paper and count how many fold marks it bears.
Given the number of folds, n, and the thickness of the paper, t, return the minimum length, L, the strip of paper must be to accommodate n folds, as well as the number of fold marks, f. Note that strips of paper only come in integer lengths.
Assume t and L are given in the same units.
Example:
n = 3
t = 0.15
L = 7
f = 7
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers15
Suggested Problems
-
Find relatively common elements in matrix rows
2149 Solvers
-
Find the sum of the elements in the "second" diagonal
1198 Solvers
-
Flag largest magnitude swings as they occur
688 Solvers
-
Sum the entries of each column of a matrix which satisfy a logical condition.
172 Solvers
-
Create a vector whose elements depend on the previous element
776 Solvers
More from this Author45
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!