Cody

# Problem 44313. "Cody" * 5 == "CodyCodyCodyCodyCody"

Solution 2679566

Submitted on 11 Jul 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
assessFunctionAbsence({'regexp','regexpi','regexprep','str2num'},'FileName','mtimes.m')

Error in solution: Line: 1 Column: 21 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

2   Fail
assert(isequal("cody" * 5, "codycodycodycodycody"))

Error in solution: Line: 1 Column: 21 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

3   Fail
assert(isequal("cody" * 5, "cody" * 2 + "cody" * 3))

Error in solution: Line: 1 Column: 21 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

4   Fail
assert(isequal(" Cody is fun! Cody is fun! Cody is fun!", 3 * " Cody is fun!"))

Error in solution: Line: 1 Column: 21 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

5   Fail
assert(isequal(" Cody 5-Year Anniversary! Cody 5-Year Anniversary!", " Cody 5-Year Anniversary!" * 2))

Error in solution: Line: 1 Column: 21 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

6   Fail
x = ["Cody";"matlab";"Simulink";"@Mathworks"] + (5:5:randi([1000,5000])); assert(isequal(x*2,x+x)) assert(isequal(x*3,x+x+x)) assert(isequal(5*x,x+x+x+x+x)) assert(isequal(101*x,x+100*x))

Error in solution: Line: 1 Column: 21 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.