Cody

Solution 1938721

Submitted on 17 Sep 2019
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
KNIGHT=true; PASSWORD='PASSWORD'; g=inline('logical(interp1([0,1],[0,x],1))','x','KNIGHT','PASSWORD'); F=@(str)xor(~KNIGHT,g(eval(str),KNIGHT,PASSWORD)); clear g KNIGHT PASSWORD; assert(isequal(solver(F),'PASSWORD'))

Error in solution: Line: 15 Column: 13 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
KNIGHT=false; PASSWORD='PASSWORD'; g=inline('logical(interp1([0,1],[0,x],1))','x','KNIGHT','PASSWORD'); F=@(str)xor(~KNIGHT,g(eval(str),KNIGHT,PASSWORD)); clear g KNIGHT PASSWORD; assert(isequal(solver(F),'PASSWORD'))

Error in solution: Line: 15 Column: 13 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
KNIGHT=false; PASSWORD='DONOTPANIC'; g=inline('logical(interp1([0,1],[0,x],1))','x','KNIGHT','PASSWORD'); F=@(str)xor(~KNIGHT,g(eval(str),KNIGHT,PASSWORD)); clear g KNIGHT PASSWORD; assert(isequal(solver(F),'DONOTPANIC'))

Error in solution: Line: 15 Column: 13 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
KNIGHT=true; PASSWORD='FORTYTWO'; g=inline('logical(interp1([0,1],[0,x],1))','x','KNIGHT','PASSWORD'); F=@(str)xor(~KNIGHT,g(eval(str),KNIGHT,PASSWORD)); clear g KNIGHT PASSWORD; assert(isequal(solver(F),'FORTYTWO'))

Error in solution: Line: 15 Column: 13 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
KNIGHT=false; PASSWORD='PLEASELETMEIN'; g=inline('logical(interp1([0,1],[0,x],1))','x','KNIGHT','PASSWORD'); F=@(str)xor(~KNIGHT,g(eval(str),KNIGHT,PASSWORD)); clear g KNIGHT PASSWORD; assert(isequal(solver(F),'PLEASELETMEIN'))

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