Cody

Solution 325843

Submitted on 30 Sep 2013
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
%% tic zstr='0000000000'; zv=[10 ]; vexp='decuple zero'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

2   Pass
%% zstr='1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111'; zv=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]; vexp='one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

3   Fail
%% zstr='1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111'; zv=[1 2 3 4 5 6 7 8 9 10 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]; vexp='one double one triple one quadruple one quintuple one sextuple one septuple one octuple one nonuple one decuple one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

Error: Evaluation of '[ans{numel($2)+11} ans{str2num($1)+1}]' failed: Index exceeds matrix dimensions.

4   Pass
%% zstr='6701604014038409645317871541814818042765712319652041768196456846465134589785405932716870450845696942'; zv=[18 53 27 2 ]; vexp='six seven zero one six zero four zero one four zero three eight four zero nine six four five three one seven eight seven one five four one eight one four eight one eight zero four two seven six five seven one two three one nine six five two zero four one seven six eight one nine six four five six eight four six four six five one three four five eight nine seven eight five four zero five nine three two seven one six eight seven zero four five zero eight four five six nine six nine four two'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

5   Pass
%% zstr='7948353719781965623468317824953101456187089254894578076436069073736717501261569457261541306241739435'; zv=[67 24 2 7 ]; vexp='seven nine four eight three five three seven one nine seven eight one nine six five six two three four six eight three one seven eight two four nine five three one zero one four five six one eight seven zero eight nine two five four eight nine four five seven eight zero seven six four three six zero six nine zero seven three seven three six seven one seven five zero one two six one five six nine four five seven two six one five four one three zero six two four one seven three nine four three five'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

6   Pass
%% zstr='4278368013428262027948460184086902458706181428387549853031942964639495026306271567618562640383239305'; zv=[99 1 ]; vexp='four two seven eight three six eight zero one three four two eight two six two zero two seven nine four eight four six zero one eight four zero eight six nine zero two four five eight seven zero six one eight one four two eight three eight seven five four nine eight five three zero three one nine four two nine six four six three nine four nine five zero two six three zero six two seven one five six seven six one eight five six two six four zero three eight three two three nine three zero five'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

7   Pass
%% zstr='9464820841980697178401716583034690432403485084358767843859195212565106243810816790591659815789420929'; zv=[23 54 6 3 12 2 ]; vexp='nine four six four eight two zero eight four one nine eight zero six nine seven one seven eight four zero one seven one six five eight three zero three four six nine zero four three two four zero three four eight five zero eight four three five eight seven six seven eight four three eight five nine one nine five two one two five six five one zero six two four three eight one zero eight one six seven nine zero five nine one six five nine eight one five seven eight nine four two zero nine two nine'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

8   Pass
%% zstr='1239417614204605186382638961928216123515856310156537949350505058426185417564013152480630168120385902'; zv=[9 20 68 3 ]; vexp='one two three nine four one seven six one four two zero four six zero five one eight six three eight two six three eight nine six one nine two eight two one six one two three five one five eight five six three one zero one five six five three seven nine four nine three five zero five zero five zero five eight four two six one eight five four one seven five six four zero one three one five two four eight zero six three zero one six eight one two zero three eight five nine zero two'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

9   Pass
%% zstr='5705658716138187897089238034926826854932909071213569698472175680807126039351827987289593273256549721'; zv=[23 49 6 21 1 ]; vexp='five seven zero five six five eight seven one six one three eight one eight seven eight nine seven zero eight nine two three eight zero three four nine two six eight two six eight five four nine three two nine zero nine zero seven one two one three five six nine six nine eight four seven two one seven five six eight zero eight zero seven one two six zero three nine three five one eight two seven nine eight seven two eight nine five nine three two seven three two five six five four nine seven two one'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

10   Pass
%% zstr='5496587298081832124197901212051639570370452063174067189290683532890857290152921651676725291709858268'; zv=[84 12 1 1 2 ]; vexp='five four nine six five eight seven two nine eight zero eight one eight three two one two four one nine seven nine zero one two one two zero five one six three nine five seven zero three seven zero four five two zero six three one seven four zero six seven one eight nine two nine zero six eight three five three two eight nine zero eight five seven two nine zero one five two nine two one six five one six seven six seven two five two nine one seven zero nine eight five eight two six eight'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

11   Pass
%% zstr='6046727253505468724903978269465059754529308478929632170216741630304035454232162816186394257019613649'; zv=[21 13 16 7 19 17 7 ]; vexp='six zero four six seven two seven two five three five zero five four six eight seven two four nine zero three nine seven eight two six nine four six five zero five nine seven five four five two nine three zero eight four seven eight nine two nine six three two one seven zero two one six seven four one six three zero three zero four zero three five four five four two three two one six two eight one six one eight six three nine four two five seven zero one nine six one three six four nine'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

12   Pass
%% zstr='9709324183067148146829125827086805141425714050976780595295963087561738097976891946025083503270131874'; zv=[19 40 15 25 1 ]; vexp='nine seven zero nine three two four one eight three zero six seven one four eight one four six eight two nine one two five eight two seven zero eight six eight zero five one four one four two five seven one four zero five zero nine seven six seven eight zero five nine five two nine five nine six three zero eight seven five six one seven three eight zero nine seven nine seven six eight nine one nine four six zero two five zero eight three five zero three two seven zero one three one eight seven four'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

13   Pass
%% zstr='5935294040195821091284183159414635231362074061646489573631084519431981565623091096745285242356956132'; zv=[49 2 47 2 ]; vexp='five nine three five two nine four zero four zero one nine five eight two one zero nine one two eight four one eight three one five nine four one four six three five two three one three six two zero seven four zero six one six four six four eight nine five seven three six three one zero eight four five one nine four three one nine eight one five six five six two three zero nine one zero nine six seven four five two eight five two four two three five six nine five six one three two'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

14   Pass
%% zstr='68420979858341861054645438226544'; zv=[9 14 9 ]; vexp='six eight four two zero nine seven nine eight five eight three four one eight six one zero five four six four five four three eight double two six five double four'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

15   Pass
%% zstr='95673537815030404160202058788558325698592015367995915420'; zv=[3 12 11 12 7 10 1 ]; vexp='nine five six seven three five three seven eight one five zero three zero four zero four one six zero two zero two zero five eight seven double eight double five eight three two five six nine eight five nine two zero one five three six seven double nine five nine one five four two zero'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

16   Pass
%% zstr='2917155597708068980673145819211425430909609607407685919790633007543533613'; zv=[8 4 12 5 15 4 8 12 5 ]; vexp='two nine one seven one triple five nine double seven zero eight zero six eight nine eight zero six seven three one four five eight one nine two double one four two five four three zero nine zero nine six zero nine six zero seven four zero seven six eight five nine one nine seven nine zero six double three double zero seven five four three five double three six one three'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

17   Pass
%% zstr='7898081583437702364634490213008907725195448'; zv=[10 12 6 12 2 1 ]; vexp='seven eight nine eight zero eight one five eight three four three double seven zero two three six four six three four four nine zero two one three double zero eight nine zero double seven two five one nine five double four eight'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

18   Pass
%% zstr='437260442554900624648844197922288914270446'; zv=[11 6 9 6 3 1 3 2 1 ]; vexp='four three seven two six zero double four two double five four nine double zero six two four six four double eight double four one nine seven nine triple two eight eight nine one four two seven zero double four six'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

19   Pass
%% zstr='2789225013517271635527397201226697731452904643719381232152395186872927418002375223547884014744'; zv=[5 9 7 2 15 1 6 4 8 9 9 3 7 5 4 ]; vexp='two seven eight nine two two five zero one three five one seven two seven one six three double five two seven three nine seven two zero one double two double six nine double seven three one four five two nine zero four six four three seven one nine three eight one two three two one five two three nine five one eight six eight seven two nine two seven four one eight double zero two three seven five double two three five four seven double eight four zero one four seven double four'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

20   Pass
%% zstr='745443046641006460911871735664538092408084394952066353448004450489821840381778094629976796'; zv=[9 1 15 14 15 8 14 7 3 2 1 1 ]; vexp='seven four five double four three zero four six six four one double zero six four six zero nine double one eight seven one seven three five double six four five three eight zero nine two four zero eight zero eight four three nine four nine five two zero double six three five three double four eight double zero double four five zero four eight nine eight two one eight four zero three eight one seven seven eight zero nine four six two double nine seven six seven nine six'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

21   Pass
%% zstr='9389581629278714115270272359258386234328448241872301648883'; zv=[15 3 1 13 6 5 7 5 3 ]; vexp='nine three eight nine five eight one six two nine two seven eight seven one four double one five two seven zero two seven two three five nine two five eight three eight six two three four three two eight double four eight two four one eight seven two three zero one six four eight double eight three'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

22   Pass
%% zstr='638110728463471172123321819781344177341197656065297520823913148755582611608'; zv=[10 6 8 1 15 12 5 7 2 3 4 1 1 ]; vexp='six three eight double one zero seven two eight four six three four seven double one seven two one two double three two one eight one nine seven eight one three double four one double seven three four double one nine seven six five six zero six five two nine seven five two zero eight two three nine one three one four eight seven double five five eight two six double one six zero eight'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

23   Pass
%% zstr='1133185809510432'; zv=[15 1 ]; vexp='double one double three one eight five eight zero nine five one zero four three two'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

24   Pass
%% zstr='238728670935325997878047006508522404463678112601608414215085957397966'; zv=[13 8 4 13 10 15 6 ]; vexp='two three eight seven two eight six seven zero nine three five three two five double nine seven eight seven eight zero four seven zero zero six five zero eight five double two four zero double four six three six seven eight double one two six zero one six zero eight four one four two one five zero eight five nine five seven three nine seven nine double six'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

25   Pass
%% zstr='85658191899305236022867183837318073902283214947760248177452103132443861485891'; zv=[1 10 15 8 4 6 7 15 8 1 1 1 ]; vexp='eight five six five eight one nine one eight double nine three zero five two three six zero double two eight six seven one eight three eight three seven three one eight zero seven three nine zero two two eight three two one four nine four double seven six zero two four eight one double seven four five two one zero three one three two four four three eight six one four eight five eight nine one'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

26   Pass
%% zstr='21770416464691789037472471701235435696232613781886745983083308143822448829'; zv=[2 8 11 10 8 14 6 11 1 1 1 1 ]; vexp='two one double seven zero four one six four six four six nine one seven eight nine zero three seven four seven two four seven one seven zero one two three five four three five six nine six two three two six one three seven eight one double eight six seven four five nine eight three zero eight three three zero eight one four three eight double two double four eight eight two nine'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

27   Pass
%% zstr='983249024136170290772296855218428763965301110152249'; zv=[2 15 14 15 4 1 ]; vexp='nine eight three two four nine zero two four one three six one seven zero two nine zero double seven double two nine six eight double five two one eight four two eight seven six three nine six five three zero triple one zero one five double two four nine'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

28   Pass
%% zstr='3480983214378717507995103066016574662185732516268288798294927774350570'; zv=[13 10 15 11 3 3 14 1 ]; vexp='three four eight zero nine eight three two one four three seven eight seven one seven five zero seven double nine five one zero three zero double six zero one six five seven four double six two one eight five seven three two five one six two six eight two double eight seven nine eight two nine four nine two triple seven four three five zero five seven zero'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

29   Pass
%% zstr='839728044162856119809065784052255130156664'; zv=[9 7 10 15 1 ]; vexp='eight three nine seven two eight zero double four one six two eight five six one one nine eight zero nine zero six five seven eight four zero five double two double five one three zero one five triple six four'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

30   Pass
%% zstr='1299716932675600468864013262733864936641800591739546149687053359054618'; zv=[5 7 14 1 12 3 14 6 4 2 1 1 ]; vexp='one two double nine seven one six nine three two six seven five six double zero four six double eight six four zero one three two six two seven double three eight six four nine three double six four one eight zero zero five nine one seven three nine five four six one four nine six eight seven zero five double three five nine zero five four six one eight'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

31   Pass
%% zstr='7896269726657598138802619158139810768633428179202282443571484595761847181128041281628185246'; zv=[2 7 8 5 6 6 11 9 5 10 12 3 7 ]; vexp='seven eight nine six two six nine seven two double six five seven five nine eight one three double eight zero two six one nine one five eight one three nine eight one zero seven six eight six double three four two eight one seven nine two zero double two eight two double four three five seven one four eight four five nine five seven six one eight four seven one eight double one two eight zero four one two eight one six two eight one eight five two four six'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

32   Pass
%% zstr='477658486684842559974665174626263159299857463838945503033'; zv=[11 11 6 14 10 2 3 ]; vexp='four double seven six five eight four eight double six eight four eight four two double five double nine seven four six six five one seven four six two six two six three one five nine two double nine eight five seven four six three eight three eight nine four double five zero three zero double three'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

33   Pass
%% zstr='06875538368304839162889133713'; zv=[3 10 1 14 1 ]; vexp='zero six eight seven double five three eight three six eight three zero four eight three nine one six two double eight nine one double three seven one three'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

34   Pass
%% zstr='45256104997445504657800410480176721551263917689055037098246476060427763254223140'; zv=[14 10 11 2 3 5 12 15 1 4 2 1 ]; vexp='four five two five six one zero four double nine seven double four five five zero four six five seven eight double zero four one zero four eight zero one seven six seven two one double five one two six three nine one seven six eight nine zero double five zero three seven zero nine eight two four six four seven six zero six zero four two double seven six three two five four double two three one four zero'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

35   Pass
%% zstr='6500507266637983912546668295413265536254049737120594152282943472025861287250184'; zv=[3 9 4 9 13 7 7 15 10 1 1 ]; vexp='six five zero zero five zero seven two triple six three seven nine eight three nine one two five four triple six eight two nine five four one three two six double five three six two five four zero four nine seven three seven one two zero five nine four one five double two eight two nine four three four seven two zero two five eight six one two eight seven two five zero one eight four'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

36   Pass
%% zstr='90536923431844238372096379800359312024577754107934353901'; zv=[9 14 14 11 5 3 ]; vexp='nine zero five three six nine two three four three one eight double four two three eight three seven two zero nine six three seven nine eight double zero three five nine three one two zero two four five triple seven five four one zero seven nine three four three five three nine zero one'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

37   Pass
%% zstr='194851729139154581103404918805045722094939046615745185586389015707908521547319803514384134067'; zv=[6 4 13 10 9 14 6 11 3 9 2 2 3 1 ]; vexp='one nine four eight five one seven two nine one three nine one five four five eight double one zero three four zero four nine one double eight zero five zero four five seven double two zero nine four nine three nine zero four double six one five seven four five one eight double five eight six three eight nine zero one five seven zero seven nine zero eight five two one five four seven three one nine eight zero three five one four three eight four one three four zero six seven'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

38   Pass
%% zstr='7180221794361'; zv=[3 7 3 ]; vexp='seven one eight zero double two one seven nine four three six one'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

39   Pass
%% zstr='328104734424917711259192901583138150643217809'; zv=[3 8 8 15 5 5 1 ]; vexp='three two eight one zero four seven three double four two four nine one double seven double one two five nine one nine two nine zero one five eight three one three eight one five zero six four three two one seven eight zero nine'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

40   Pass
%% zstr='4012446744'; zv=[8 1 1 ]; vexp='four zero one two double four six seven four four'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

41   Pass
%% zstr='75159567609950672038714189757246751900662587864067030579646570165557726996672'; zv=[13 15 11 7 1 15 8 3 4 ]; vexp='seven five one five nine five six seven six zero double nine five zero six seven two zero three eight seven one four one eight nine seven five seven two four six seven five one nine double zero six six two five eight seven eight six four zero six seven zero three zero five seven nine six four six five seven zero one six triple five double seven two six double nine double six seven two'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

42   Pass
%% zstr='3799620377074233419333355599242743805155864309640885130882726110701418994547411411126234428060'; zv=[7 9 1 15 13 7 8 15 8 2 6 3 ]; vexp='three seven double nine six two zero three double seven zero seven four two double three four one nine quadruple three triple five double nine two four two seven four three eight zero five one double five eight six four three zero nine six four zero double eight five one three zero double eight two seven two six double one zero seven zero one four one eight double nine four five four seven four double one four triple one two six two three double four two eight zero six zero'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

43   Pass
%% zstr='4044617922891601574869890265644168731524925085154541620867323759734908590210726392474762696192267779'; zv=[11 10 11 14 12 2 4 1 11 7 10 2 1 4 ]; vexp='four zero double four six one seven nine double two eight nine one six zero one five seven four eight six nine eight nine zero two six five six double four one six eight seven three one five two four nine two five zero eight five one five four five four one six two zero eight six seven three two three seven five nine seven three four nine zero eight five nine zero two one zero seven two six three nine two four seven four seven six two six nine six one nine double two six triple seven nine'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

44   Pass
%% zstr='496013127684385845636701597670212145677337967472957547809568709115873526515'; zv=[3 3 8 7 2 10 9 4 15 9 5 ]; vexp='four nine six zero one three one two seven six eight four three eight five eight four five six three six seven zero one five nine seven six seven zero two one two one four five six double seven double three seven nine six seven four seven two nine five seven five four seven eight zero nine five six eight seven zero nine double one five eight seven three five two six five one five'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

45   Pass
%% zstr='820821167030568093577157791027439613729645803722099835506620383'; zv=[10 5 12 5 9 7 12 1 1 1 ]; vexp='eight two zero eight two double one six seven zero three zero five six eight zero nine three five double seven one five double seven nine one zero two seven four three nine six one three seven two nine six four five eight zero three seven double two zero double nine eight three double five zero double six two zero three eight three'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

46   Pass
%% zstr='408657487448884114668701663855295152810754544275633734090577026733934929585122688051672821523'; zv=[9 12 14 7 13 4 11 14 5 1 1 2 ]; vexp='four zero eight six five seven four eight seven double four triple eight four double one four double six eight seven zero one double six three eight double five two nine five one five two eight one zero seven five four five double four two seven five six double three seven three four zero nine zero five seven seven zero two six seven double three nine three four nine two nine five eight five one double two six double eight zero five one six seven two eight two one five two three'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

47   Pass
%% zstr='83666830362426720310982782694422780383449883455418709'; zv=[12 1 5 6 9 9 3 2 5 1 ]; vexp='eight three triple six eight three zero three six two four two six seven two zero three one zero nine eight two seven eight two six nine double four double two seven eight zero three eight three double four nine eight eight three four double five four one eight seven zero nine'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

48   Pass
%% zstr='70'; zv=[2 ]; vexp='seven zero'; vstr=Phone_CH(zstr,zv); assert(strcmp(vstr,vexp))

49   Fail