Please check test case 3, where number 7 is mistakenly skipped.
Also, number 12 in test case 4 ...
In test case 2, if x=0, should the sequence be 1:22 or completely empty?
@James: "If x = 0, integers that are the sums of any 2 or more consecutive previous elements should be omitted."
@Peng, thank you for the great catch. An illusive issue with my reference solution disrupted test cases 3 and 4. Now fixed.
Find state names that end with the letter A
717 Solvers
Reverse the Words (not letters) of a String
297 Solvers
Sum the numbers on the main diagonal
457 Solvers
5323 Solvers
Calculate the integral of the polynomial
86 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!