Cody

# Problem 1201. Simple Decoder Ring

Solution 1837551

Submitted on 4 Jun 2019 by YIFEI ZHANG
• Size: 8
• This is the leading solution.
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   Pass
inString1 = 'I am ready to try it - with punctuation and CAPS!'; outString1a = 'F xj obxav ql qov fq - tfqe mrkzqrxqflk xka ZXMP!'; assert(isequal(simpleDecoderRing(inString1,-3),outString1a ));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In simpleDecoderRing (line 2) In ScoringEngineTestPoint1 (line 3) In solutionTest (line 3)]

2   Pass
inString1 = 'I am ready to try it - with punctuation and CAPS!'; outString1b = 'L dp uhdgb wr wub lw - zlwk sxqfwxdwlrq dqg FDSV!'; assert(isequal(simpleDecoderRing(inString1,3),outString1b ));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In simpleDecoderRing (line 2) In ScoringEngineTestPoint2 (line 3) In solutionTest (line 5)]

3   Pass
inString2 = 'Dick Tracy is often associated with decoder rings.'; outString2a = 'Lqks Bzikg qa wnbmv iaawkqibml eqbp lmkwlmz zqvoa.'; assert(isequal(simpleDecoderRing(inString2,-18),outString2a ));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In simpleDecoderRing (line 2) In ScoringEngineTestPoint3 (line 3) In solutionTest (line 7)]

4   Pass
inString2 = 'Dick Tracy is often associated with decoder rings.'; outString2b = 'Zeyg Pnwyu eo kbpaj wookyewpaz sepd zaykzan nejco.'; assert(isequal(simpleDecoderRing(inString2,22),outString2b ));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In simpleDecoderRing (line 2) In ScoringEngineTestPoint4 (line 3) In solutionTest (line 9)]