Cody

# Problem 723. QWERTY Shift Encoder

Solution 93615

Submitted on 29 May 2012
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
%% s='ThE qUiCk BrOwN fOx JuMpEd OvEr ThE lAzY dOg'; se = 'YjR wIoVl NtPeM gPc Ki<[Rf PbRt YjR ;SxU fPh'; assert(isequal(Qwerty_encode(s),se))

m = Columns 1 through 10 32 32 32 32 32 32 32 32 32 32 Columns 11 through 20 32 32 32 32 32 32 32 32 32 32 Columns 21 through 30 32 32 32 32 32 32 32 32 32 32 Columns 31 through 40 32 32 32 32 32 32 32 32 32 32 Columns 41 through 50 32 32 32 46 32 122 32 32 32 32 Columns 51 through 60 32 32 32 32 32 32 32 32 46 32 Columns 61 through 70 32 32 32 32 32 32 32 32 32 32 Columns 71 through 80 32 32 32 32 32 32 32 32 32 32 Columns 81 through 90 32 32 32 32 32 32 32 32 32 32 Columns 91 through 100 113 32 32 32 32 32 115 110 118 102 Columns 101 through 110 114 103 104 106 111 107 108 59 44 109 Columns 111 through 120 112 91 119 116 100 121 105 98 101 99 Columns 121 through 128 117 120 32 32 32 32 32 32 m = Columns 1 through 10 32 32 32 32 32 32 32 32 32 32 Columns 11 through 20 32 32 32 32 32 32 32 32 32 32 Columns 21 through 30 32 32 32 32 32 32 32 32 32 32 Columns 31 through 40 32 32 32 32 32 32 32 32 32 32 Columns 41 through 50 32 32 32 46 32 90 32 32 32 32 Columns 51 through 60 32 32 32 32 32 32 32 46 46 46 Columns 61 through 70 32 32 32 32 83 78 86 70 82 71 Columns 71 through 80 72 74 79 75 76 58 60 77 80 123 Columns 81 through 90 87 84 68 89 73 66 69 67 85 88 Columns 91 through 100 113 32 32 32 32 32 115 110 118 102 Columns 101 through 110 114 103 104 106 111 107 108 59 44 109 Columns 111 through 120 112 91 119 116 100 121 105 98 101 99 Columns 121 through 128 117 120 81 32 32 32 32 32

2   Pass
%% s='abcdefghijklmnopqrstuvwxyz'; se='snvfrghjokl;,mp[wtdyibecux'; % a-z assert(isequal(Qwerty_encode(s),se))

m = Columns 1 through 10 32 32 32 32 32 32 32 32 32 32 Columns 11 through 20 32 32 32 32 32 32 32 32 32 32 Columns 21 through 30 32 32 32 32 32 32 32 32 32 32 Columns 31 through 40 32 32 32 32 32 32 32 32 32 32 Columns 41 through 50 32 32 32 46 32 122 32 32 32 32 Columns 51 through 60 32 32 32 32 32 32 32 32 46 32 Columns 61 through 70 32 32 32 32 32 32 32 32 32 32 Columns 71 through 80 32 32 32 32 32 32 32 32 32 32 Columns 81 through 90 32 32 32 32 32 32 32 32 32 32 Columns 91 through 100 113 32 32 32 32 32 115 110 118 102 Columns 101 through 110 114 103 104 106 111 107 108 59 44 109 Columns 111 through 120 112 91 119 116 100 121 105 98 101 99 Columns 121 through 128 117 120 32 32 32 32 32 32 m = Columns 1 through 10 32 32 32 32 32 32 32 32 32 32 Columns 11 through 20 32 32 32 32 32 32 32 32 32 32 Columns 21 through 30 32 32 32 32 32 32 32 32 32 32 Columns 31 through 40 32 32 32 32 32 32 32 32 32 32 Columns 41 through 50 32 32 32 46 32 90 32 32 32 32 Columns 51 through 60 32 32 32 32 32 32 32 46 46 46 Columns 61 through 70 32 32 32 32 83 78 86 70 82 71 Columns 71 through 80 72 74 79 75 76 58 60 77 80 123 Columns 81 through 90 87 84 68 89 73 66 69 67 85 88 Columns 91 through 100 113 32 32 32 32 32 115 110 118 102 Columns 101 through 110 114 103 104 106 111 107 108 59 44 109 Columns 111 through 120 112 91 119 116 100 121 105 98 101 99 Columns 121 through 128 117 120 81 32 32 32 32 32

3   Pass
%% s='ABCDEFGHIJKLMNOPQRSTUVWXYZ'; se='SNVFRGHJOKL:<MP{WTDYIBECUX'; % A-Z assert(isequal(Qwerty_encode(s),se))

m = Columns 1 through 10 32 32 32 32 32 32 32 32 32 32 Columns 11 through 20 32 32 32 32 32 32 32 32 32 32 Columns 21 through 30 32 32 32 32 32 32 32 32 32 32 Columns 31 through 40 32 32 32 32 32 32 32 32 32 32 Columns 41 through 50 32 32 32 46 32 122 32 32 32 32 Columns 51 through 60 32 32 32 32 32 32 32 32 46 32 Columns 61 through 70 32 32 32 32 32 32 32 32 32 32 Columns 71 through 80 32 32 32 32 32 32 32 32 32 32 Columns 81 through 90 32 32 32 32 32 32 32 32 32 32 Columns 91 through 100 113 32 32 32 32 32 115 110 118 102 Columns 101 through 110 114 103 104 106 111 107 108 59 44 109 Columns 111 through 120 112 91 119 116 100 121 105 98 101 99 Columns 121 through 128 117 120 32 32 32 32 32 32 m = Columns 1 through 10 32 32 32 32 32 32 32 32 32 32 Columns 11 through 20 32 32 32 32 32 32 32 32 32 32 Columns 21 through 30 32 32 32 32 32 32 32 32 32 32 Columns 31 through 40 32 32 32 32 32 32 32 32 32 32 Columns 41 through 50 32 32 32 46 32 90 32 32 32 32 Columns 51 through 60 32 32 32 32 32 32 32 46 46 46 Columns 61 through 70 32 32 32 32 83 78 86 70 82 71 Columns 71 through 80 72 74 79 75 76 58 60 77 80 123 Columns 81 through 90 87 84 68 89 73 66 69 67 85 88 Columns 91 through 100 113 32 32 32 32 32 115 110 118 102 Columns 101 through 110 114 103 104 106 111 107 108 59 44 109 Columns 111 through 120 112 91 119 116 100 121 105 98 101 99 Columns 121 through 128 117 120 81 32 32 32 32 32

4   Fail
%% s='You miss 100 percent of the shots you never take. Gretzky'; se='Upi ,odd 100 [rtvrmy pg yjr djpyd upi mrbrt yslr. Htryxlu'; assert(isequal(Qwerty_encode(s),se))

Error: Assertion failed.

5   Fail
%% s='Those who believe in telekinetics raise my hand. Vonnegut'; se='Yjpdr ejp nr;orbr om yr;rlomryovd tsodr ,u jsmf. Bpmmrhiy'; assert(isequal(Qwerty_encode(s),se))

Error: Assertion failed.