It would be good if Cody penalized huge strings. :)
Solution uses regexprep with dynamic operators for the replacement expression which outsmarts Cody's size calculation.
This is just silly. It's gaming the Matlab grader, and not doing a particularly good job at that. Why should this stop at 3999?
Very nicely done.
934 Solvers
Project Euler: Problem 10, Sum of Primes
724 Solvers
312 Solvers
"Low : High - Low : High - Turn around " -- Create a subindices vector
325 Solvers
Vectorize the digits of an Integer
272 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!