Cody

Problem 2721. Pandigital Factors (Based on Euler 491)

Solution 2653607

Submitted on 5 Jul 2020
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   Fail
x = 4;y=7; y_correct = 13; assert(isequal(pandigit_factors(x,y),y_correct));

t = '43210' t = '43201' t = '43120' t = '43102' t = '43021' t = '43012' t = '42310' t = '42301' t = '42130' t = '42103' t = '42031' t = '42013' t = '41320' t = '41302' t = '41230' t = '41203' t = '41032' t = '41023' t = '40321' t = '40312' t = '40231' t = '40213' t = '40132' t = '40123' t = '34210' t = '34201' t = '34120' t = '34102' t = '34021' t = '34012' t = '32410' t = '32401' t = '32140' t = '32104' t = '32041' t = '32014' t = '31420' t = '31402' t = '31240' t = '31204' t = '31042' t = '31024' t = '30421' t = '30412' t = '30241' t = '30214' t = '30142' t = '30124' t = '24310' t = '24301' t = '24130' t = '24103' t = '24031' t = '24013' t = '23410' t = '23401' t = '23140' t = '23104' t = '23041' t = '23014' t = '21430' t = '21403' t = '21340' t = '21304' t = '21043' t = '21034' t = '20431' t = '20413' t = '20341' t = '20314' t = '20143' t = '20134' t = '14320' t = '14302' t = '14230' t = '14203' t = '14032' t = '14023' t = '13420' t = '13402' t = '13240' t = '13204' t = '13042' t = '13024' t = '12430' t = '12403' t = '12340' t = '12304' t = '12043' t = '12034' t = '10432' t = '10423' t = '10342' t = '10324' t = '10243' t = '10234'

Output argument "pf" (and maybe others) not assigned during call to "pandigit_factors". Error in Test1 (line 3) assert(isequal(pandigit_factors(x,y),y_correct));

2   Fail
x = 3;y=3; y_correct = 18; assert(isequal(pandigit_factors(x,y),y_correct));

t = '3210' t = '3201' t = '3120' t = '3102' t = '3021' t = '3012' t = '2310' t = '2301' t = '2130' t = '2103' t = '2031' t = '2013' t = '1320' t = '1302' t = '1230' t = '1203' t = '1032' t = '1023'

Output argument "pf" (and maybe others) not assigned during call to "pandigit_factors". Error in Test2 (line 3) assert(isequal(pandigit_factors(x,y),y_correct));

3   Fail
x = 8;y=8; y_correct = 45360; assert(isequal(pandigit_factors(x,y),y_correct));

t = '876543210' t = '876543201' t = '876543120' t = '876543102' t = '876543021' t = '876543012' t = '876542310' t = '876542301' t = '876542130' t = '876542103' t = '876542031' t = '876542013' t = '876541320' t = '876541302' t = '876541230' t = '876541203' t = '876541032' t = '876541023' t = '876540321' t = '876540312' t = '876540231' t = '876540213' t = '876540132' t = '876540123' t = '876534210' t = '876534201' t = '876534120' t = '876534102' t = '876534021' t = '876534012' t = '876532410' t = '876532401' t = '876532140' t = '876532104' t = '876532041' t = '876532014' t = '876531420' t = '876531402' t = '876531240' t = '876531204' t = '876531042' t = '876531024' t = '876530421' t = '876530412' t = '876530241' t = '876530214' t = '876530142' t = '876530124' t = '876524310' t = '876524301' t = '876524130' t = '876524103' t = '876524031' t = '876524013' t = '876523410' t = '876523401' t = '876523140' t = '876523104' t = '876523041' t = '876523014' t = '876521430' t = '876521403' t = '876521340' t = '876521304' t = '876521043' t = '876521034' t = '876520431' t = '876520413' t = '876520341' t = '876520314' t = '876520143' t = '876520134' t = '876514320' t = '876514302' t = '876514230' t = '876514203' t = '876514032' t = '876514023' t = '876513420' t = '876513402' t = '876513240' t = '876513204' t = '876513042' t = '876513024' t = '876512430' t = '876512403' t = '876512340' t = '876512304' t = '876512043' t = '876512034' t = '876510432' t = '876510423' t = '876510342' t = '876510324' t = '876510243' t = '876510234' t = '876504321' t = '876504312' t = '876504231' t = '876504213' t = '876504132' t = '876504123' t = '876503421' t = '876503412' t = '876503241' t = '876503214' t = '876503142' t = '876503124' t = '876502431' t = '876502413' t = '876502341' t = '876502314' t = '876502143' t = '876502134' t = '876501432' t = '876501423' t = '876501342' t = '876501324' t = '876501243' t = '876501234' t = '876453210' t = '876453201' t = '876453120' t = '876453102' t = '876453021' t = '876453012' t = '876452310' t = '876452301' t = '876452130' t = '876452103' t = '876452031' t = '876452013' t = '876451320' t = '876451302' t = '876451230' t = '876451203' t = '876451032' t = '876451023' t = '876450321' t = '876450312' t = '876450231' t = '876450213' t = '876450132' t = '876450123' t = '876435210' t = '876435201' t = '876435120' t = '876435102' t = '876435021' t = '876435012' t = '876432510' t = '876432501' t = '876432150' t = '876432105' t = '876432051' t = '876432015' t = '876431520' t = '876431502' t = '876431250' t = '876431205' t = '876431052' t = '876431025' t = '876430521' t = '876430512' t = '876430251' t = '876430215' t = '876430152' t = '876430125' t = '876425310' t = '876425301' t = '876425130' t = '876425103' t = '876425031' t = '876425013' t = '876423510' t = '876423501' t = '876423150' t = '876423105' t = '876423051' t = '876423015' t = '876421530' t = '876421503' t = '876421350' t = '876421305' t = '876421053' t = '876421035' t = '876420531' t = '876420513' t = '876420351' t = '876420315' t = '876420153' t = '876420135' t = '876415320' t = '876415302' t = '876415230' t = '876415203' t = '876415032' t = '876415023' t = '876413520' t = '876413502' t = '876413250' t = '876413205' t = '876413052' t = '876413025' t = '876412530' t = '876412503' t = '876412350' t = '876412305' t = '876412053' t = '876412035' t = '876410532' t = '876410523' t = '876410352' t = '876410325' t = '876410253' t = '876410235' t = '876405321' t = '876405312' t = '876405231' t = '876405213' t = '876405132' t = '876405123' t = '876403521' t = '876403512' t = '876403251' t = '876403215' t = '876403152' t = '876403125' t = '876402531' t = '876402513' t = '876402351' t = '876402315' t = '876402153' t = '876402135' t = '876401532' t = '876401523' t = '876401352' t = '876401325' t = '876401253' t = '876401235' t = '876354210' t = '876354201' t = '876354120' t = '876354102' t = '876354021' t = '876354012' t = '876352410' t = '876352401' t = '876352140' t = '876352104' t = '876352041' t = '876352014' t = '876351420' t = '876351402' t = '876351240' t = '876351204' t = '876351042' t = '876351024' t = '876350421' t = '876350412' t = '876350241' t = '876350214' t = '876350142' t = '876350124' t = '876345210' t = '876345201' t = '876345120' t = '876345102' t = '876345021' t = '876345012' t = '876342510' t = '876342501' t = '876342150' t = '876342105' t = '876342051' t = '876342015' t = '876341520' t = '876341502' t = '876341250' t = '876341205' t = '876341052' t = '876341025' t = '876340521' t = '876340512' t = '876340251' t = '876340215' t = '876340152' t = '876340125' t = '876325410' t = '876325401' t = '876325140' t = '876325104' t = '876325041' t = '876325014' t = '876324510' t = '876324501' t = '876324150' t = '876324105' t = '876324051' t = '876324015' t = '876321540' t = '876321504' t = '876321450' t = '876321405' t = '876321054' t = '876321045' t = '876320541' t = '876320514' t = '876320451' t = '876320415' t = '876320154' t = '876320145' t = '876315420' t = '876315402' t = '876315240' t = '876315204' t = '876315042' t = '876315024' t = '876314520' t = '876314502' t = '876314250' t = '876314205' t = '876314052' t = '876314025' t = '876312540' t = '876312504' t = '876312450' t = '876312405' t = '876312054' t = '876312045' t = '876310542' t = '876310524' t = '876310452' t = '876310425' t = '876310254' t = '876310245' t = '876305421' t = '876305412' t = '876305241' t = '876305214' t = '876305142' t = '876305124' t = '876304521' t = '876304512' t = '876304251' t = '876304215' t = '876304152' t = '876304125' t = '876302541' t = '876302514' t = '876302451' t = '876302415' t = '876302154' t = '876302145' t = '876301542' t = '876301524' t = '876301452' t = '876301425' t = '876301254' t = '876301245' t = '876254310' t = '876254301' t = '876254130' t = '876254103' t = '876254031' t = '876254013' t = '876253410' t = '876253401' t = '876253140' t = '876253104' t = '876253041' t = '876253014' t = '876251430' t = '876251403' t = '876251340' t = '876251304' t = '876251043' t = '876251034' t = '876250431' t = '876250413' t = '876250341' t = '876250314' t = '876250143' t = '876250134' t = '876245310' t = '876245301' t = '876245130' t = '876245103' t = '876245031' t = '876245013' t = '876243510' t = '876243501' t = '876243150' t = '876243105' t = '876243051' t = '876243015' t = '876241530' t = '876241503' t = '876241350' t = '876241305' t = '876241053' t = '876241035' t = '876240531' t = '876240513' t = '876240351' t = '876240315' t = '876240153' t = '876240135' t = '876235410' t = '876235401' t = '876235140' t = '876235104' t = '876235041' t = '876235014' t = '876234510' t = '876234501' t = '876234150' t = '876234105' t = '876234051' t = '876234015' t = '876231540' t = '876231504' t = '876231450' t = '876231405' t = '876231054' t = '876231045' t = '876230541' t = '876230514' t = '876230451' t = '876230415' t = '876230154' t = '876230145' t = '876215430' t = '876215403' t = '87621534...

Output argument "pf" (and maybe others) not assigned during call to "pandigit_factors". Error in Test3 (line 3) assert(isequal(pandigit_factors(x,y),y_correct));

4   Fail
j=[600 312 600 144 216 312 75 74 0 120 0 144 55]; x=5;y=ceil(13*rand) assert(isequal(pandigit_factors(x,y),j(y)));

y = 1 t = '543210' t = '543201' t = '543120' t = '543102' t = '543021' t = '543012' t = '542310' t = '542301' t = '542130' t = '542103' t = '542031' t = '542013' t = '541320' t = '541302' t = '541230' t = '541203' t = '541032' t = '541023' t = '540321' t = '540312' t = '540231' t = '540213' t = '540132' t = '540123' t = '534210' t = '534201' t = '534120' t = '534102' t = '534021' t = '534012' t = '532410' t = '532401' t = '532140' t = '532104' t = '532041' t = '532014' t = '531420' t = '531402' t = '531240' t = '531204' t = '531042' t = '531024' t = '530421' t = '530412' t = '530241' t = '530214' t = '530142' t = '530124' t = '524310' t = '524301' t = '524130' t = '524103' t = '524031' t = '524013' t = '523410' t = '523401' t = '523140' t = '523104' t = '523041' t = '523014' t = '521430' t = '521403' t = '521340' t = '521304' t = '521043' t = '521034' t = '520431' t = '520413' t = '520341' t = '520314' t = '520143' t = '520134' t = '514320' t = '514302' t = '514230' t = '514203' t = '514032' t = '514023' t = '513420' t = '513402' t = '513240' t = '513204' t = '513042' t = '513024' t = '512430' t = '512403' t = '512340' t = '512304' t = '512043' t = '512034' t = '510432' t = '510423' t = '510342' t = '510324' t = '510243' t = '510234' t = '504321' t = '504312' t = '504231' t = '504213' t = '504132' t = '504123' t = '503421' t = '503412' t = '503241' t = '503214' t = '503142' t = '503124' t = '502431' t = '502413' t = '502341' t = '502314' t = '502143' t = '502134' t = '501432' t = '501423' t = '501342' t = '501324' t = '501243' t = '501234' t = '453210' t = '453201' t = '453120' t = '453102' t = '453021' t = '453012' t = '452310' t = '452301' t = '452130' t = '452103' t = '452031' t = '452013' t = '451320' t = '451302' t = '451230' t = '451203' t = '451032' t = '451023' t = '450321' t = '450312' t = '450231' t = '450213' t = '450132' t = '450123' t = '435210' t = '435201' t = '435120' t = '435102' t = '435021' t = '435012' t = '432510' t = '432501' t = '432150' t = '432105' t = '432051' t = '432015' t = '431520' t = '431502' t = '431250' t = '431205' t = '431052' t = '431025' t = '430521' t = '430512' t = '430251' t = '430215' t = '430152' t = '430125' t = '425310' t = '425301' t = '425130' t = '425103' t = '425031' t = '425013' t = '423510' t = '423501' t = '423150' t = '423105' t = '423051' t = '423015' t = '421530' t = '421503' t = '421350' t = '421305' t = '421053' t = '421035' t = '420531' t = '420513' t = '420351' t = '420315' t = '420153' t = '420135' t = '415320' t = '415302' t = '415230' t = '415203' t = '415032' t = '415023' t = '413520' t = '413502' t = '413250' t = '413205' t = '413052' t = '413025' t = '412530' t = '412503' t = '412350' t = '412305' t = '412053' t = '412035' t = '410532' t = '410523' t = '410352' t = '410325' t = '410253' t = '410235' t = '405321' t = '405312' t = '405231' t = '405213' t = '405132' t = '405123' t = '403521' t = '403512' t = '403251' t = '403215' t = '403152' t = '403125' t = '402531' t = '402513' t = '402351' t = '402315' t = '402153' t = '402135' t = '401532' t = '401523' t = '401352' t = '401325' t = '401253' t = '401235' t = '354210' t = '354201' t = '354120' t = '354102' t = '354021' t = '354012' t = '352410' t = '352401' t = '352140' t = '352104' t = '352041' t = '352014' t = '351420' t = '351402' t = '351240' t = '351204' t = '351042' t = '351024' t = '350421' t = '350412' t = '350241' t = '350214' t = '350142' t = '350124' t = '345210' t = '345201' t = '345120' t = '345102' t = '345021' t = '345012' t = '342510' t = '342501' t = '342150' t = '342105' t = '342051' t = '342015' t = '341520' t = '341502' t = '341250' t = '341205' t = '341052' t = '341025' t = '340521' t = '340512' t = '340251' t = '340215' t = '340152' t = '340125' t = '325410' t = '325401' t = '325140' t = '325104' t = '325041' t = '325014' t = '324510' t = '324501' t = '324150' t = '324105' t = '324051' t = '324015' t = '321540' t = '321504' t = '321450' t = '321405' t = '321054' t = '321045' t = '320541' t = '320514' t = '320451' t = '320415' t = '320154' t = '320145' t = '315420' t = '315402' t = '315240' t = '315204' t = '315042' t = '315024' t = '314520' t = '314502' t = '314250' t = '314205' t = '314052' t = '314025' t = '312540' t = '312504' t = '312450' t = '312405' t = '312054' t = '312045' t = '310542' t = '310524' t = '310452' t = '310425' t = '310254' t = '310245' t = '305421' t = '305412' t = '305241' t = '305214' t = '305142' t = '305124' t = '304521' t = '304512' t = '304251' t = '304215' t = '304152' t = '304125' t = '302541' t = '302514' t = '302451' t = '302415' t = '302154' t = '302145' t = '301542' t = '301524' t = '301452' t = '301425' t = '301254' t = '301245' t = '254310' t = '254301' t = '254130' t = '254103' t = '254031' t = '254013' t = '253410' t = '253401' t = '253140' t = '253104' t = '253041' t = '253014' t = '251430' t = '251403' t = '251340' t = '251304' t = '251043' t = '251034' t = '250431' t = '250413' t = '250341' t = '250314' t = '250143' t = '250134' t = '245310' t = '245301' t = '245130' t = '245103' t = '245031' t = '245013' t = '243510' t = '243501' t = '243150' t = '243105' t = '243051' t = '243015' t = '241530' t = '241503' t = '241350' t = '241305' t = '241053' t = '241035' t = '240531' t = '240513' t = '240351' t = '240315' t = '240153' t = '240135' t = '235410' t = '235401' t = '235140' t = '235104' t = '235041' t = '235014' t = '234510' t = '234501' t = '234150' t = '234105' t = '234051' t = '234015' t = '231540' t = '231504' t = '231450' t = '231405' t = '231054' t = '231045' t = '230541' t = '230514' t = '230451' t = '230415' t = '230154' t = '230145' t = '215430' t = '215403' t = '215340' t = '215304' t = '215043' t = '215034' t = '214530' t = '214503' t = '214350' t = '214305' t = '214053' t = '214035' t = '213540' t = '213504' t = '213450' t = '213405' t = '213054' t = '213045' t = '210543' t = '210534' t = '210453' t = '210435' t = '210354' t = '210345' t = '205431' t = '205413' t = '205341' t = '205314' t = '205143' t = '205134' t = '204531' t = '204513' t = '204351' t = '204315' t = '204153' t = '204135' t = '203541' t = '203514' t = '203451' t = '203415' t = '203154' t = '203145' t = '201543' t = '201534' t = '201453' t = '201435' t = '201354' t = '201345' t = '154320' t = '154302' t = '154230' t = '154203' t = '154032' t = '154023' t = '153420' t = '153402' t = '153240' t = '153204' t = '153042' t = '153024' t = '152430' t = '152403' t = '152340' t = '152304' t = '152043' t = '152034' t = '150432' t = ...

Output argument "pf" (and maybe others) not assigned during call to "pandigit_factors". Error in Test4 (line 3) assert(isequal(pandigit_factors(x,y),j(y)));

5   Fail
x=1;y=10; assert(isequal(pandigit_factors(x,y),x));

t = '10'

Output argument "pf" (and maybe others) not assigned during call to "pandigit_factors". Error in Test5 (line 2) assert(isequal(pandigit_factors(x,y),x));