Cody

# Problem 1694. Now 20% off!

Solution 1202878

Submitted on 2 Jun 2017 by Noriko Hounoki
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='non-essential personnel' s_correct = 'non-eXsentXal peXsonnXl'; assert(isequal(string_furlough(s),s_correct))

s = 'non-essential personnel' ac = 110 111 110 45 101 115 115 101 110 116 105 97 108 32 112 101 114 115 111 110 110 101 108 num = 23 c = 0 c = 1 c = 2 c = 3 c = 4 c = 5 ac = 110 111 110 45 101 88 115 101 110 116 105 97 108 32 112 101 114 115 111 110 110 101 108 c = 6 c = 7 c = 8 c = 9 c = 10 ac = 110 111 110 45 101 88 115 101 110 116 88 97 108 32 112 101 114 115 111 110 110 101 108 c = 11 c = 12 c = 13 c = 14 c = 15 ac = 110 111 110 45 101 88 115 101 110 116 88 97 108 32 112 101 88 115 111 110 110 101 108 c = 16 c = 17 c = 18 c = 19 c = 20 ac = 110 111 110 45 101 88 115 101 110 116 88 97 108 32 112 101 88 115 111 110 110 88 108 c = 21 y = 'non-eXsentXal peXsonnXl'

2   Pass
s='The furloughs will continue until morale improves.' s_correct = 'The fXrlouXhs wiXl conXinue Xntil XoralX imprXves.'; assert(isequal(string_furlough(s),s_correct))

s = 'The furloughs will continue until morale improves.' ac = Columns 1 through 29 84 104 101 32 102 117 114 108 111 117 103 104 115 32 119 105 108 108 32 99 111 110 116 105 110 117 101 32 117 Columns 30 through 50 110 116 105 108 32 109 111 114 97 108 101 32 105 109 112 114 111 118 101 115 46 num = 50 c = 0 c = 1 c = 2 c = 3 c = 4 c = 5 ac = Columns 1 through 29 84 104 101 32 102 88 114 108 111 117 103 104 115 32 119 105 108 108 32 99 111 110 116 105 110 117 101 32 117 Columns 30 through 50 110 116 105 108 32 109 111 114 97 108 101 32 105 109 112 114 111 118 101 115 46 c = 6 c = 7 c = 8 c = 9 c = 10 ac = Columns 1 through 29 84 104 101 32 102 88 114 108 111 117 88 104 115 32 119 105 108 108 32 99 111 110 116 105 110 117 101 32 117 Columns 30 through 50 110 116 105 108 32 109 111 114 97 108 101 32 105 109 112 114 111 118 101 115 46 c = 11 c = 12 c = 13 c = 14 c = 15 ac = Columns 1 through 29 84 104 101 32 102 88 114 108 111 117 88 104 115 32 119 105 88 108 32 99 111 110 116 105 110 117 101 32 117 Columns 30 through 50 110 116 105 108 32 109 111 114 97 108 101 32 105 109 112 114 111 118 101 115 46 c = 16 c = 17 c = 18 c = 19 c = 20 ac = Columns 1 through 29 84 104 101 32 102 88 114 108 111 117 88 104 115 32 119 105 88 108 32 99 111 110 88 105 110 117 101 32 117 Columns 30 through 50 110 116 105 108 32 109 111 114 97 108 101 32 105 109 112 114 111 118 101 115 46 c = 21 c = 22 c = 23 c = 24 c = 25 ac = Columns 1 through 29 84 104 101 32 102 88 114 108 111 117 88 104 115 32 119 105 88 108 32 99 111 110 88 105 110 117 101 32 88 Columns 30 through 50 110 116 105 108 32 109 111 114 97 108 101 32 105 109 112 114 111 118 101 115 46 c = 26 c = 27 c = 28 c = 29 c = 30 ac = Columns 1 through 29 84 104 101 32 102 88 114 108 111 117 88 104 115 32 119 105 88 108 32 99 111 110 88 105 110 117 101 32 88 Columns 30 through 50 110 116 105 108 32 88 111 114 97 108 101 32 105 109 112 114 111 118 101 115 46 c = 31 c = 32 c = 33 c = 34 c = 35 ac = Columns 1 through 29 84 104 101 32 102 88 114 108 111 117 88 104 115 32 119 105 88 108 32 99 111 110 88 105 110 117 101 32 88 Columns 30 through 50 110 116 105 108 32 88 111 114 97 108 88 32 105 109 112 114 111 118 101 115 46 c = 36 c = 37 c = 38 c = 39 c = 40 ac = Columns 1 through 29 84 104 101 32 102 88 114 108 111 117 88 104 115 32 119 105 88 108 32 99 111 110 88 105 110 117 101 32 88 Columns 30 through 50 110 116 105 108 32 88 111 114 97 108 88 32 105 109 112 114 88 118 101 115 46 c = 41 c = 42 c = 43 y = 'The fXrlouXhs wiXl conXinue Xntil XoralX imprXves.'

3   Pass
s='Who doesn''t like a 20% pay cut?' s_correct='Who dXesn''t Xike a 20% Xay cuX?' assert(isequal(string_furlough(s),s_correct))

s = 'Who doesn't like a 20% pay cut?' s_correct = 'Who dXesn't Xike a 20% Xay cuX?' ac = Columns 1 through 29 87 104 111 32 100 111 101 115 110 39 116 32 108 105 107 101 32 97 32 50 48 37 32 112 97 121 32 99 117 Columns 30 through 31 116 63 num = 31 c = 0 c = 1 c = 2 c = 3 c = 4 c = 5 ac = Columns 1 through 29 87 104 111 32 100 88 101 115 110 39 116 32 108 105 107 101 32 97 32 50 48 37 32 112 97 121 32 99 117 Columns 30 through 31 116 63 c = 6 c = 7 c = 8 c = 9 c = 10 ac = Columns 1 through 29 87 104 111 32 100 88 101 115 110 39 116 32 88 105 107 101 32 97 32 50 48 37 32 112 97 121 32 99 117 Columns 30 through 31 116 63 c = 11 c = 12 c = 13 c = 14 c = 15 ac = Columns 1 through 29 87 104 111 32 100 88 101 115 110 39 116 32 88 105 107 101 32 97 32 50 48 37 32 88 97 121 32 99 117 Columns 30 through 31 116 63 c = 16 c = 17 c = 18 c = 19 c = 20 ac = Columns 1 through 29 87 104 111 32 100 88 101 115 110 39 116 32 88 105 107 101 32 97 32 50 48 37 32 88 97 121 32 99 117 Columns 30 through 31 88 63 y = 'Who dXesn't Xike a 20% Xay cuX?'

4   Pass
s='The quick brown fox jumps over the lazy dog.' s_correct = 'The qXick bXown fXx jumXs oveX the lXzy doX.'; assert(isequal(string_furlough(s),s_correct))

s = 'The quick brown fox jumps over the lazy dog.' ac = Columns 1 through 29 84 104 101 32 113 117 105 99 107 32 98 114 111 119 110 32 102 111 120 32 106 117 109 112 115 32 111 118 101 Columns 30 through 44 114 32 116 104 101 32 108 97 122 121 32 100 111 103 46 num = 44 c = 0 c = 1 c = 2 c = 3 c = 4 c = 5 ac = Columns 1 through 29 84 104 101 32 113 88 105 99 107 32 98 114 111 119 110 32 102 111 120 32 106 117 109 112 115 32 111 118 101 Columns 30 through 44 114 32 116 104 101 32 108 97 122 121 32 100 111 103 46 c = 6 c = 7 c = 8 c = 9 c = 10 ac = Columns 1 through 29 84 104 101 32 113 88 105 99 107 32 98 88 111 119 110 32 102 111 120 32 106 117 109 112 115 32 111 118 101 Columns 30 through 44 114 32 116 104 101 32 108 97 122 121 32 100 111 103 46 c = 11 c = 12 c = 13 c = 14 c = 15 ac = Columns 1 through 29 84 104 101 32 113 88 105 99 107 32 98 88 111 119 110 32 102 88 120 32 106 117 109 112 115 32 111 118 101 Columns 30 through 44 114 32 116 104 101 32 108 97 122 121 32 100 111 103 46 c = 16 c = 17 c = 18 c = 19 c = 20 ac = Columns 1 through 29 84 104 101 32 113 88 105 99 107 32 98 88 111 119 110 32 102 88 120 32 106 117 109 88 115 32 111 118 101 Columns 30 through 44 114 32 116 104 101 32 108 97 122 121 32 100 111 103 46 c = 21 c = 22 c = 23 c = 24 c = 25 ac = Columns 1 through 29 84 104 101 32 113 88 105 99 107 32 98 88 111 119 110 32 102 88 120 32 106 117 109 88 115 32 111 118 101 Columns 30 through 44 88 32 116 104 101 32 108 97 122 121 32 100 111 103 46 c = 26 c = 27 c = 28 c = 29 c = 30 ac = Columns 1 through 29 84 104 101 32 113 88 105 99 107 32 98 88 111 119 110 32 102 88 120 32 106 117 109 88 115 32 111 118 101 Columns 30 through 44 88 32 116 104 101 32 108 88 122 121 32 100 111 103 46 c = 31 c = 32 c = 33 c = 34 c = 35 ac = Columns 1 through 29 84 104 101 32 113 88 105 99 107 32 98 88 111 119 110 32 102 88 120 32 106 117 109 88 115 32 111 118 101 Columns 30 through 44 88 32 116 104 101 32 108 88 122 121 32 100 111 88 46 y = 'The qXick bXown fXx jumXs oveX the lXzy doX.'

5   Pass
s='A-B-C. Easy as 1-2-3.'; s_correct = 'A-B-C. EXsy as 1-2-3.'; assert(isequal(string_furlough(s),s_correct))

ac = 65 45 66 45 67 46 32 32 69 97 115 121 32 97 115 32 49 45 50 45 51 46 num = 22 c = 0 c = 1 c = 2 c = 3 c = 4 c = 5 ac = 65 45 66 45 67 46 32 32 69 88 115 121 32 97 115 32 49 45 50 45 51 46 c = 6 c = 7 c = 8 c = 9 y = 'A-B-C. EXsy as 1-2-3.'

6   Pass
s='My single favorite TV show is X-Files!'; s_correct='My siXgle fXvoriXe TV sXow is X-FileX!'; assert(isequal(string_furlough(s),s_correct))

ac = Columns 1 through 29 77 121 32 115 105 110 103 108 101 32 102 97 118 111 114 105 116 101 32 84 86 32 115 104 111 119 32 105 115 Columns 30 through 38 32 88 45 70 105 108 101 115 33 num = 38 c = 0 c = 1 c = 2 c = 3 c = 4 c = 5 ac = Columns 1 through 29 77 121 32 115 105 88 103 108 101 32 102 97 118 111 114 105 116 101 32 84 86 32 115 104 111 119 32 105 115 Columns 30 through 38 32 88 45 70 105 108 101 115 33 c = 6 c = 7 c = 8 c = 9 c = 10 ac = Columns 1 through 29 77 121 32 115 105 88 103 108 101 32 102 88 118 111 114 105 116 101 32 84 86 32 115 104 111 119 32 105 115 Columns 30 through 38 32 88 45 70 105 108 101 115 33 c = 11 c = 12 c = 13 c = 14 c = 15 ac = Columns 1 through 29 77 121 32 115 105 88 103 108 101 32 102 88 118 111 114 105 88 101 32 84 86 32 115 104 111 119 32 105 115 Columns 30 through 38 32 88 45 70 105 108 101 115 33 c = 16 c = 17 c = 18 c = 19 c = 20 ac = Columns 1 through 29 77 121 32 115 105 88 103 108 101 32 102 88 118 111 114 105 88 101 32 84 86 32 115 88 111 119 32 105 115 Columns 30 through 38 32 88 45 70 105 108 101 115 33 c = 21 c = 22 c = 23 c = 24 c = 25 ac = Columns 1 through 29 77 121 32 115 105 88 103 108 101 32 102 88 118 111 114 105 88 101 32 84 86 32 115 88 111 119 32 105 115 Columns 30 through 38 32 88 45 70 105 108 101 115 33 c = 26 c = 27 c = 28 c = 29 c = 30 ac = Columns 1 through 29 77 121 32 115 105 88 103 108 101 32 102 88 118 111 114 105 88 101 32 84 86 32 115 88 111 119 32 105 115 Columns 30 through 38 32 88 45 70 105 108 101 88 33 y = 'My siXgle fXvoriXe TV sXow is X-FileX!'