I submitted one solution, and it did return the sum as a string, but complained of insufficient memory. Because of the order of operations, it was creating the n=12 array while evaluating n=11, and that array was apparently too large for Cody. Fixed now, but it is apparently going to be a problem for n=12 and above.
My code choked on n = 12 on my laptop. That was the motivation for the three optional tests, as well as for one of the tags.
Disallowing 'if' seems to disallow 'circshift' also, which I assume was not your intent.
Correct. I changed the test to look for 'if '.
Given an unsigned integer x, find the largest y by rearranging the bits in x
Project Euler: Problem 2, Sum of even Fibonacci
Given a matrix, swap the 2nd & 3rd columns
frame of the matrix
Compute the nth term from the Sieve of Flavius Josephus
List the titles of Cody problems
Count the ways to draw non-intersecting chords between points on a circle
Investigate the frequency of last digits of prime numbers
Eliminate redundant numbers in text
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office