Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 179308

Submitted on 19 Dec 2012 by Aurelien Queffurust

Correct

125Size
Leading solution size is 18.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
x = [2639 99];
y_correct = 'cody';
assert(isequal(simple_cryptography(x),y_correct))
ans =
    'amdw'
    'amdx'
    'amdy'
    'amdz'
    'amew'
    'amex'
    'amey'
    'amez'
    'amfw'
    'amfx'
    'amfy'
    'amfz'
    'andw'
    'andx'
    'andy'
    'andz'
    'anew'
    'anex'
    'aney'
    'anez'
    'anfw'
    'anfx'
    'anfy'
    'anfz'
    'aodw'
    'aodx'
    'aody'
    'aodz'
    'aoew'
    'aoex'
    'aoey'
    'aoez'
    'aofw'
    'aofx'
    'aofy'
    'aofz'
    'bmdw'
    'bmdx'
    'bmdy'
    'bmdz'
    'bmew'
    'bmex'
    'bmey'
    'bmez'
    'bmfw'
    'bmfx'
    'bmfy'
    'bmfz'
    'bndw'
    'bndx'
    'bndy'
    'bndz'
    'bnew'
    'bnex'
    'bney'
    'bnez'
    'bnfw'
    'bnfx'
    'bnfy'
    'bnfz'
    'bodw'
    'bodx'
    'body'
    'bodz'
    'boew'
    'boex'
    'boey'
    'boez'
    'bofw'
    'bofx'
    'bofy'
    'bofz'
    'cmdw'
    'cmdx'
    'cmdy'
    'cmdz'
    'cmew'
    'cmex'
    'cmey'
    'cmez'
    'cmfw'
    'cmfx'
    'cmfy'
    'cmfz'
    'cndw'
    'cndx'
    'cndy'
    'cndz'
    'cnew'
    'cnex'
    'cney'
    'cnez'
    'cnfw'
    'cnfx'
    'cnfy'
    'cnfz'
    'codw'
    'codx'
    'cody'
    'codz'
    'coew'
    'coex'
    'coey'
    'coez'
    'cofw'
    'cofx'
    'cofy'
    'cofz'
ans =
cody
2
Pass
 
%%
x = [2 1 746753 1196 3627978 2809 797836 1597];
y_correct = 'a simple encrypt system';
assert(isequal(simple_cryptography(x),y_correct))
ans =
    'a'
    'b'
    'c'
ans =
    'pgmpjd'
    'pgmpje'
    'pgmpjf'
    'pgmpkd'
    'pgmpke'
    'pgmpkf'
    'pgmpld'
    'pgmple'
    'pgmplf'
    'pgmqjd'
    'pgmqje'
    'pgmqjf'
    'pgmqkd'
    'pgmqke'
    'pgmqkf'
    'pgmqld'
    'pgmqle'
    'pgmqlf'
    'pgmrjd'
    'pgmrje'
    'pgmrjf'
    'pgmrkd'
    'pgmrke'
    'pgmrkf'
    'pgmrld'
    'pgmrle'
    'pgmrlf'
    'pgmsjd'
    'pgmsje'
    'pgmsjf'
    'pgmskd'
    'pgmske'
    'pgmskf'
    'pgmsld'
    'pgmsle'
    'pgmslf'
    'pgnpjd'
    'pgnpje'
    'pgnpjf'
    'pgnpkd'
    'pgnpke'
    'pgnpkf'
    'pgnpld'
    'pgnple'
    'pgnplf'
    'pgnqjd'
    'pgnqje'
    'pgnqjf'
    'pgnqkd'
    'pgnqke'
    'pgnqkf'
    'pgnqld'
    'pgnqle'
    'pgnqlf'
    'pgnrjd'
    'pgnrje'
    'pgnrjf'
    'pgnrkd'
    'pgnrke'
    'pgnrkf'
    'pgnrld'
    'pgnrle'
    'pgnrlf'
    'pgnsjd'
    'pgnsje'
    'pgnsjf'
    'pgnskd'
    'pgnske'
    'pgnskf'
    'pgnsld'
    'pgnsle'
    'pgnslf'
    'pgopjd'
    'pgopje'
    'pgopjf'
    'pgopkd'
    'pgopke'
    'pgopkf'
    'pgopld'
    'pgople'
    'pgoplf'
    'pgoqjd'
    'pgoqje'
    'pgoqjf'
    'pgoqkd'
    'pgoqke'
    'pgoqkf'
    'pgoqld'
    'pgoqle'
    'pgoqlf'
    'pgorjd'
    'pgorje'
    'pgorjf'
    'pgorkd'
    'pgorke'
    'pgorkf'
    'pgorld'
    'pgorle'
    'pgorlf'
    'pgosjd'
    'pgosje'
    'pgosjf'
    'pgoskd'
    'pgoske'
    'pgoskf'
    'pgosld'
    'pgosle'
    'pgoslf'
    'phmpjd'
    'phmpje'
    'phmpjf'
    'phmpkd'
    'phmpke'
    'phmpkf'
    'phmpld'
    'phmple'
    'phmplf'
    'phmqjd'
    'phmqje'
    'phmqjf'
    'phmqkd'
    'phmqke'
    'phmqkf'
    'phmqld'
    'phmqle'
    'phmqlf'
    'phmrjd'
    'phmrje'
    'phmrjf'
    'phmrkd'
    'phmrke'
    'phmrkf'
    'phmrld'
    'phmrle'
    'phmrlf'
    'phmsjd'
    'phmsje'
    'phmsjf'
    'phmskd'
    'phmske'
    'phmskf'
    'phmsld'
    'phmsle'
    'phmslf'
    'phnpjd'
    'phnpje'
    'phnpjf'
    'phnpkd'
    'phnpke'
    'phnpkf'
    'phnpld'
    'phnple'
    'phnplf'
    'phnqjd'
    'phnqje'
    'phnqjf'
    'phnqkd'
    'phnqke'
    'phnqkf'
    'phnqld'
    'phnqle'
    'phnqlf'
    'phnrjd'
    'phnrje'
    'phnrjf'
    'phnrkd'
    'phnrke'
    'phnrkf'
    'phnrld'
    'phnrle'
    'phnrlf'
    'phnsjd'
    'phnsje'
    'phnsjf'
    'phnskd'
    'phnske'
    'phnskf'
    'phnsld'
    'phnsle'
    'phnslf'
    'phopjd'
    'phopje'
    'phopjf'
    'phopkd'
    'phopke'
    'phopkf'
    'phopld'
    'phople'
    'phoplf'
    'phoqjd'
    'phoqje'
    'phoqjf'
    'phoqkd'
    'phoqke'
    'phoqkf'
    'phoqld'
    'phoqle'
    'phoqlf'
    'phorjd'
    'phorje'
    'phorjf'
    'phorkd'
    'phorke'
    'phorkf'
    'phorld'
    'phorle'
    'phorlf'
    'phosjd'
    'phosje'
    'phosjf'
    'phoskd'
    'phoske'
    'phoskf'
    'phosld'
    'phosle'
    'phoslf'
    'pimpjd'
    'pimpje'
    'pimpjf'
    'pimpkd'
    'pimpke'
    'pimpkf'
    'pimpld'
    'pimple'
    'pimplf'
    'pimqjd'
    'pimqje'
    'pimqjf'
    'pimqkd'
    'pimqke'
    'pimqkf'
    'pimqld'
    'pimqle'
    'pimqlf'
    'pimrjd'
    'pimrje'
    'pimrjf'
    'pimrkd'
    'pimrke'
    'pimrkf'
    'pimrld'
    'pimrle'
    'pimrlf'
    'pimsjd'
    'pimsje'
    'pimsjf'
    'pimskd'
    'pimske'
    'pimskf'
    'pimsld'
    'pimsle'
    'pimslf'
    'pinpjd'
    'pinpje'
    'pinpjf'
    'pinpkd'
    'pinpke'
    'pinpkf'
    'pinpld'
    'pinple'
    'pinplf'
    'pinqjd'
    'pinqje'
    'pinqjf'
    'pinqkd'
    'pinqke'
    'pinqkf'
    'pinqld'
    'pinqle'
    'pinqlf'
    'pinrjd'
    'pinrje'
    'pinrjf'
    'pinrkd'
    'pinrke'
    'pinrkf'
    'pinrld'
    'pinrle'
    'pinrlf'
    'pinsjd'
    'pinsje'
    'pinsjf'
    'pinskd'
    'pinske'
    'pinskf'
    'pinsld'
    'pinsle'
    'pinslf'
    'piopjd'
    'piopje'
    'piopjf'
    'piopkd'
    'piopke'
    'piopkf'
    'piopld'
    'piople'
    'pioplf'
    'pioqjd'
    'pioqje'
    'pioqjf'
    'pioqkd'
    'pioqke'
    'pioqkf'
    'pioqld'
    'pioqle'
    'pioqlf'
    'piorjd'
    'piorje'
    'piorjf'
    'piorkd'
    'piorke'
    'piorkf'
    'piorld'
    'piorle'
    'piorlf'
    'piosjd'
    'piosje'
    'piosjf'
    'pioskd'
    'pioske'
    'pioskf'
    'piosld'
    'piosle'
    'pioslf'
    'qgmpjd'
    'qgmpje'
    'qgmpjf'
    'qgmpkd'
    'qgmpke'
    'qgmpkf'
    'qgmpld'
    'qgmple'
    'qgmplf'
    'qgmqjd'
    'qgmqje'
    'qgmqjf'
    'qgmqkd'
    'qgmqke'
    'qgmqkf'
    'qgmqld'
    'qgmqle'
    'qgmqlf'
    'qgmrjd'
    'qgmrje'
    'qgmrjf'
    'qgmrkd'
    'qgmrke'
    'qgmrkf'
    'qgmrld'
    'qgmrle'
    'qgmrlf'
    'qgmsjd'
    'qgmsje'
    'qgmsjf'
    'qgmskd'
    'qgmske'
    'qgmskf'
    'qgmsld'
    'qgmsle'
    'qgmslf'
    'qgnpjd'
    'qgnpje'
    'qgnpjf'
    'qgnpkd'
    'qgnpke'
    'qgnpkf'
    'qgnpld'
    'qgnple'
    'qgnplf'
    'qgnqjd'
    'qgnqje'
    'qgnqjf'
    'qgnqkd'
    'qgnqke'
    'qgnqkf'
    'qgnqld'
    'qgnqle'
    'qgnqlf'
    'qgnrjd'
    'qgnrje'
    'qgnrjf'
    'qgnrkd'
    'qgnrke'
    'qgnrkf'
    'qgnrld'
    'qgnrle'
    'qgnrlf'
    'qgnsjd'
    'qgnsje'
    'qgnsjf'
    'qgnskd'
    'qgnske'
    'qgnskf'
    'qgnsld'
    'qgnsle'
    'qgnslf'
    'qgopjd'
    'qgopje'
    'qgopjf'
    'qgopkd'
    'qgopke'
    'qgopkf'
    'qgopld'
    'qgople'
    'qgoplf'
    'qgoqjd'
    'qgoqje'
    'qgoqjf'
    'qgoqkd'
    'qgoqke'
    'qgoqkf'
    'qgoqld'
    'qgoqle'
    'qgoqlf'
    'qgorjd'
    'qgorje'
    'qgorjf'
    'qgorkd'
    'qgorke'
    'qgorkf'
    'qgorld'
    'qgorle'
    'qgorlf'
    'qgosjd'
    'qgosje'
    'qgosjf'
    'qgoskd'
    'qgoske'
    'qgoskf'
    'qgosld'
    'qgosle'
    'qgoslf'
    'qhmpjd'
    'qhmpje'
    'qhmpjf'
    'qhmpkd'
    'qhmpke'
    'qhmpkf'
    'qhmpld'
    'qhmple'
    'qhmplf'
    'qhmqjd'
    'qhmqje'
    'qhmqjf'
    'qhmqkd'
    'qhmqke'
    'qhmqkf'
    'qhmqld'
    'qhmqle'
    'qhmqlf'
    'qhmrjd'
    'qhmrje'
    'qhmrjf'
    'qhmrkd'
    'qhmrke'
    'qhmrkf'
    'qhmrld'
    'qhmrle'
    'qhmrlf'
    'qhmsjd'
    'qhmsje'
    'qhmsjf'
    'qhmskd'
    'qhmske'
    'qhmskf'
    'qhmsld'
    'qhmsle'
    'qhmslf'
    'qhnpjd'
    'qhnpje'
    'qhnpjf'
    'qhnpkd'
    'qhnpke'
    'qhnpkf'
    'qhnpld'
    'qhnple'
    'qhnplf'
    'qhnqjd'
    'qhnqje'
    'qhnqjf'
    'qhnqkd'
    'qhnqke'
    'qhnqkf'
    'qhnqld'
    'qhnqle'
    'qhnqlf'
    'qhnrjd'
    'qhnrje'
    'qhnrjf'
    'qhnrkd'
    'qhnrke'
    'qhnrkf'
    'qhnrld'
    'qhnrle'
    'qhnrlf'
    'qhnsjd'
    'qhnsje'
    'qhnsjf'
    'qhnskd'
    'qhnske'
    'qhnskf'
    'qhnsld'
    'qhnsle'
    'qhnslf'
    'qhopjd'
    'qhopje'
    'qhopjf'
    'qhopkd'
    'qhopke'
    'qhopkf'
    'qhopld'
    'qhople'
    'qhoplf'
    'qhoqjd'
    'qhoqje'
    'qhoqjf'
    'qhoqkd'
    'qhoqke'
    'qhoqkf'
    'qhoqld'
    'qhoqle'
    'qhoqlf'
    'qhorjd'
    'qhorje'
    'qhorjf'
    'qhorkd'
    'qhorke'
    'qhorkf'
    'qhorld'
    'qhorle'
    'qhorlf'
    'qhosjd'
    'qhosje'
    'qhosjf'
    'qhoskd'
    'qhoske'
    'qhoskf'
    'qhosld'
    'qhosle'
    'qhoslf'
    'qimpjd'
    'qimpje'
    'qimpjf'
    'qimpkd'
    'qimpke'
    'qimpkf'
    'qimpld'
    'qimple'
    'qimplf'
    'qimqjd'
    'qimqje'
    'qimqjf'
    'qimqkd'
    'qimqke'
    'qimqkf'
    'qimqld'
    'qimqle'
    'qimqlf'
    'qimrjd'
    'qimrje'
    'qimrjf'
    'qimrkd'
    'qimrke'
    'qimrkf'
    'qimrld'
    'qimrle'
    'qimrlf'
    'qimsjd'
    'qimsje'
    'qimsjf'
    'qimskd'
    'qimske'
    'qimskf'
    'qimsld'
    'qimsle'
    'qimslf'
    'qinpjd'
    'qinpje'
    'qinpjf'
    'qinpkd'
    'qinpke'
    'qinpkf'
    'qinpld'
    'qinple'
    'qinplf'
    'qinqjd'
    'qinqje'
    'qinqjf'
    'qinqkd'
    'qinqke'
    'qinqkf'
    'qinqld'
    'qinqle'
    'qinqlf'
    'qinrjd'
    'qinrje'
    'qinrjf'
    'qinrkd'
    'qinrke'
    'qinrkf'
    'qinrld'
    'qinrle'
    'qinrlf'
    'qinsjd'
    'qinsje'
    'qinsjf'
    'qinskd'
    'qinske'
    'qinskf'
    'qinsld'
    'qinsle'
    'qinslf'
    'qiopjd'
    'qiopje'
    'qiopjf'
    'qiopkd'
    'qiopke'
    'qiopkf'
    'qiopld'
    'qiople'
    'qioplf'
    'qioqjd'
    'qioqje'
    'qioqjf'
    'qioqkd'
    'qioqke'
    'qioqkf'
    'qioqld'
    'qioqle'
    'qioqlf'
    'qiorjd'
    'qiorje'
    'qiorjf'
    'qiorkd'
    'qiorke'
    'qiorkf'
    'qiorld'
    'qiorle'
    'qiorlf'
    'qiosjd'
    'qiosje'
    'qiosjf'
    'qioskd'
    'qioske'
    'qioskf'
    'qiosld'
    'qiosle'
    'qioslf'
    'rgmpjd'
    'rgmpje'
    'rgmpjf'
    'rgmpkd'
    'rgmpke'
    'rgmpkf'
    'rgmpld'
    'rgmple'
    'rgmplf'
    'rgmqjd'
    'rgmqje'
    'rgmqjf'
    'rgmqkd'
    'rgmqke'
    'rgmqkf'
    'rgmqld'
    'rgmqle'
    'rgmqlf'
    'rgmrjd'
    'rgmrje'
    'rgmrjf'
    'rgmrkd'
    'rgmrke'
    'rgmrkf'
    'rgmrld'
    'rgmrle'
    'rgmrlf'
    'rgmsjd'
    'rgmsje'
    'rgmsjf'
    'rgmskd'
    'rgmske'
    'rgmskf'
    'rgmsld'
    'rgmsle'
    'rgmslf'
    'rgnpjd'
    'rgnpje'
    'rgnpjf'
    'rgnpkd'
    'rgnpke'
    'rgnpkf'
    'rgnpld'
    'rgnple'
    'rgnplf'
    'rgnqjd'
    'rgnqje'
    'rgnqjf'
    'rgnqkd'
    'rgnqke'
    'rgnqkf'
    'rgnqld'
    'rgnqle'
    'rgnqlf'
    'rgnrjd'
    'rgnrje'
    'rgnrjf'
    'rgnrkd'
    'rgnrke'
    'rgnrkf'
    'rgnrld'
    'rgnrle'
    'rgnrlf'
    'rgnsjd'
    'rgnsje'
    'rgnsjf'
    'rgnskd'
    'rgnske'
    'rgnskf'
    'rgnsld'
    'rgnsle'
    'rgnslf'
    'rgopjd'
    'rgopje'
    'rgopjf'
    'rgopkd'
    'rgopke'
    'rgopkf'
    'rgopld'
    'rgople'
    'rgoplf'
    'rgoqjd'
    'rgoqje'
    'rgoqjf'
    'rgoqkd'
    'rgoqke'
    'rgoqkf'
    'rgoqld'
    'rgoqle'
    'rgoqlf'
    'rgorjd'
    'rgorje'
    'rgorjf'
    'rgorkd'
    'rgorke'
    'rgorkf'
    'rgorld'
    'rgorle'
    'rgorlf'
    'rgosjd'
    'rgosje'
    'rgosjf'
    'rgoskd'
    'rgoske'
    'rgoskf'
    'rgosld'
    'rgosle'
    'rgoslf'
    'rhmpjd'
    'rhmpje'
    'rhmpjf'
    'rhmpkd'
    'rhmpke'
    'rhmpkf'
    'rhmpld'
    'rhmple'
    'rhmplf'
    'rhmqjd'
    '...