The (Mahler-Popken) complexity of n: minimal number of 1's required to build n using + and *. see A005245.
In this problem, you need to write the expression down, i.e., the return y is a string.
The answer is of course not unique, so just meet the requirement.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers41
Suggested Problems
-
Return a list sorted by number of occurrences
2898 Solvers
-
Project Euler: Problem 5, Smallest multiple
1675 Solvers
-
1944 Solvers
-
Find the index of n in magic(n)
275 Solvers
-
388 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Thanks to Divid.