Cody

# Problem 565. Transposition as a CIPHER

Solution 73172

Submitted on 9 Apr 2012 by James
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
%% s1 = 'My name is Sourav Mondal'; y_correct = 'MUYRNAAVMMEOINSDSAOL'; assert(isequal(transposition(s1),y_correct))

s1 = MYNAMEISSOURAVMONDAL b = 10 c = 1 2 3 4 5 6 7 8 9 10 d = 11 12 13 14 15 16 17 18 19 20 y = '' y = MU y = MUYR y = MUYRNA y = MUYRNAAV y = MUYRNAAVMM y = MUYRNAAVMMEO y = MUYRNAAVMMEOIN y = MUYRNAAVMMEOINSD y = MUYRNAAVMMEOINSDSA y = MUYRNAAVMMEOINSDSAOL

2   Pass
%% s1 = 'i am a common cipher'; y_correct = 'IOANMCAICPOHMEMR'; assert(isequal(transposition(s1),y_correct))

s1 = IAMACOMMONCIPHER b = 8 c = 1 2 3 4 5 6 7 8 d = 9 10 11 12 13 14 15 16 y = '' y = IO y = IOAN y = IOANMC y = IOANMCAI y = IOANMCAICP y = IOANMCAICPOH y = IOANMCAICPOHME y = IOANMCAICPOHMEMR

3   Pass
%% s1 = 'BATMAN rules GOTHAM'; y_correct = 'BEASTGMOATNHRAUML'; assert(isequal(transposition(s1),y_correct))

s1 = BATMANRULESGOTHAM b = 9 c = 1 2 3 4 5 6 7 8 9 d = 10 11 12 13 14 15 16 17 y = '' y = BE y = BEAS y = BEASTG y = BEASTGMO y = BEASTGMOAT y = BEASTGMOATNH y = BEASTGMOATNHRA y = BEASTGMOATNHRAUM y = BEASTGMOATNHRAUML