Problem 2405. The Number of Ways
70.0% Correct | 30.0% Incorrect
Last Solution submitted on Aug 23, 2022
Jan Orwat on 9 Jul 2014
It won't work correctly for n greater than 10. :-)
ans-7*(ans>10) would fix that.
Alfonso Nieto-Castanon on 9 Jul 2014
You are right, you could use ind2sub to avoid some of the limitations of dec2base as well (e.g. for n>36)...
Problem Recent Solvers33
Numbers with prime factors 2, 3 and 5.
Return elements unique to either input
Calculate the Hamming distance between two strings
More from this Author21
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!