Cody

# Problem 1201. Simple Decoder Ring

Solution 2730006

Submitted on 22 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   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 ));

outString = [] outString = 'F xj obxav ql qov fq - tfqe mrkzqrxqflk xka ZXMP!'

2   Fail
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 ));

outString = [] outString = 76 32 100 112 32 117 104 100 103 100 outString = 76 32 100 112 32 117 104 100 103 100 32 119 114 32 119 117 100 outString = 'L dp uhdgd wr wud lw - zlwk sxqfwxdwlrq dqg FDSV!'

Assertion failed.

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 ));

outString = [] outString = 'Lqks Bzikg qa wnbmv iaawkqibml eqbp lmkwlmz zqvoa.'

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

outString = [] outString = 90 103 outString = 90 103 121 105 outString = 90 103 121 105 32 82 outString = 90 103 121 105 32 82 112 outString = 90 103 121 105 32 82 112 119 121 119 outString = 90 103 121 105 32 82 112 119 121 119 32 103 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 outString = 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 32 32 117 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 33 32 117 103 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 34 32 117 103 114 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 35 32 117 103 114 102 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 38 32 117 103 114 102 32 122 99 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 40 32 117 103 114 102 32 122 99 121 109 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 42 32 117 103 114 102 32 122 99 121 109 122 99 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 43 32 117 103 114 102 32 122 99 121 109 122 99 112 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 45 32 117 103 114 102 32 122 99 121 109 122 99 112 32 112 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 46 32 117 103 114 102 32 122 99 121 109 122 99 112 32 112 103 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 47 32 117 103 114 102 32 122 99 121 109 122 99 112 32 112 103 108 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 48 32 117 103 114 102 32 122 99 121 109 122 99 112 32 112 103 108 101 outString = Columns 1 through 30 90 103 121 105 32 82 112 119 121 119 32 103 113 32 109 100 114 99 108 32 119 113 113 109 121 103 119 114 99 122 Columns 31 through 49 32 117 103 114 102 32 122 99 121 109 122 99 112 32 112 103 108 101 113 outString = 'Zgyi Rpwyw gq mdrcl wqqmygwrcz ugrf zcymzcp pgleq.'

Assertion failed.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!