Cody

Solution 1305986

Submitted on 20 Oct 2017 by Ned Gulley
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(regexprep(char(string(dec2missing5(3))),'^0*',''),'3'))

xb9 = '3'

2   Pass
assert(isequal(regexprep(char(string(dec2missing5(14))),'^0*',''),'16'))

xb9 = '15'

3   Pass
assert(isequal(regexprep(char(string(dec2missing5(19))),'^0*',''),'21'))

xb9 = '21'

4   Pass
assert(isequal(regexprep(char(string(dec2missing5(80))),'^0*',''),'99'))

xb9 = '88'

5   Pass
assert(isequal(regexprep(char(string(dec2missing5(91))),'^0*',''),'111'))

xb9 = '111'

6   Pass
assert(isequal(regexprep(char(string(dec2missing5(313))),'^0*',''),'388'))

xb9 = '377'

7   Pass
assert(isequal(regexprep(char(string(dec2missing5(732))),'^0*',''),'1003'))

xb9 = '1003'

8   Pass
assert(isequal(regexprep(char(string(dec2missing5(748))),'^0*',''),'1021'))

xb9 = '1021'

9   Pass
assert(isequal(regexprep(char(string(dec2missing5(1249))),'^0*',''),'1738'))

xb9 = '1637'

10   Pass
assert(isequal(regexprep(char(string(dec2missing5(1873))),'^0*',''),'2611'))

xb9 = '2511'

11   Pass
assert(isequal(regexprep(char(string(dec2missing5(2790))),'^0*',''),'3840'))

xb9 = '3740'

12   Pass
assert(isequal(regexprep(char(string(dec2missing5(3035))),'^0*',''),'4142'))

xb9 = '4142'

13   Pass
assert(isequal(regexprep(char(string(dec2missing5(3391))),'^0*',''),'4688'))

xb9 = '4577'

14   Pass
assert(isequal(regexprep(char(string(dec2missing5(3547))),'^0*',''),'4881'))

xb9 = '4771'

15   Pass
assert(isequal(regexprep(char(string(dec2missing5(3724))),'^0*',''),'6098'))

xb9 = '5087'

16   Pass
assert(isequal(regexprep(char(string(dec2missing5(4057))),'^0*',''),'6608'))

xb9 = '5507'

17   Pass
assert(isequal(regexprep(char(string(dec2missing5(4221))),'^0*',''),'6810'))

xb9 = '5710'

18   Pass
assert(isequal(regexprep(char(string(dec2missing5(4389))),'^0*',''),'7017'))

xb9 = '6016'

19   Pass
assert(isequal(regexprep(char(string(dec2missing5(4444))),'^0*',''),'7088'))

xb9 = '6077'

20   Pass
assert(isequal(regexprep(char(string(dec2missing5(4489))),'^0*',''),'7138'))

xb9 = '6137'

21   Pass
assert(isequal(regexprep(char(string(dec2missing5(4530))),'^0*',''),'7193'))

xb9 = '6183'

22   Pass
assert(isequal(regexprep(char(string(dec2missing5(4533))),'^0*',''),'7197'))

xb9 = '6186'

23   Pass
assert(isequal(regexprep(char(string(dec2missing5(4569))),'^0*',''),'7237'))

xb9 = '6236'

24   Pass
assert(isequal(regexprep(char(string(dec2missing5(4585))),'^0*',''),'7264'))

xb9 = '6254'

25   Pass
assert(isequal(regexprep(char(string(dec2missing5(4651))),'^0*',''),'7338'))

xb9 = '6337'

26   Pass
assert(isequal(regexprep(char(string(dec2missing5(4680))),'^0*',''),'7380'))

xb9 = '6370'

27   Pass
assert(isequal(regexprep(char(string(dec2missing5(5455))),'^0*',''),'8431'))

xb9 = '7431'

28   Pass
assert(isequal(regexprep(char(string(dec2missing5(5711))),'^0*',''),'8846'))

xb9 = '7745'

29   Pass
assert(isequal(regexprep(char(string(dec2missing5(5949))),'^0*',''),'9140'))

xb9 = '8140'

30   Pass
assert(isequal(regexprep(char(string(dec2missing5(5999))),'^0*',''),'9206'))

xb9 = '8205'

31   Pass
assert(isequal(regexprep(char(string(dec2missing5(6075))),'^0*',''),'9300'))

xb9 = '8300'

32   Pass
assert(isequal(regexprep(char(string(dec2missing5(6526))),'^0*',''),'9961'))

xb9 = '8851'

33   Pass
assert(isequal(regexprep(char(string(dec2missing5(6601))),'^0*',''),'10044'))

xb9 = '10044'

34   Pass
assert(isequal(regexprep(char(string(dec2missing5(6634))),'^0*',''),'10091'))

xb9 = '10081'

35   Pass
assert(isequal(regexprep(char(string(dec2missing5(6728))),'^0*',''),'10206'))

xb9 = '10205'

36   Pass
assert(isequal(regexprep(char(string(dec2missing5(6787))),'^0*',''),'10281'))

xb9 = '10271'

37   Pass
assert(isequal(regexprep(char(string(dec2missing5(6902))),'^0*',''),'10419'))

xb9 = '10418'

38   Pass
assert(isequal(regexprep(char(string(dec2missing5(7037))),'^0*',''),'10689'))

xb9 = '10578'

39   Pass
assert(isequal(regexprep(char(string(dec2missing5(7212))),'^0*',''),'10903'))

xb9 = '10803'

40   Pass
assert(isequal(regexprep(char(string(dec2missing5(7493))),'^0*',''),'11246'))

xb9 = '11245'

41   Pass
assert(isequal(regexprep(char(string(dec2missing5(7962))),'^0*',''),'11927'))

xb9 = '11826'

42   Pass
assert(isequal(regexprep(char(string(dec2missing5(7996))),'^0*',''),'11974'))

xb9 = '11864'

43   Pass
assert(isequal(regexprep(char(string(dec2missing5(8062))),'^0*',''),'12048'))

xb9 = '12047'

44   Pass
assert(isequal(regexprep(char(string(dec2missing5(8109))),'^0*',''),'12110'))

xb9 = '12110'

45   Pass
assert(isequal(regexprep(char(string(dec2missing5(8248))),'^0*',''),'12284'))

xb9 = '12274'

46   Pass
assert(isequal(regexprep(char(string(dec2missing5(8427))),'^0*',''),'12603'))

xb9 = '12503'

47   Pass
assert(isequal(regexprep(char(string(dec2missing5(8538))),'^0*',''),'12737'))

xb9 = '12636'

48   Pass
assert(isequal(regexprep(char(string(dec2missing5(8620))),'^0*',''),'12838'))

xb9 = '12737'

49   Pass
assert(isequal(regexprep(char(string(dec2missing5(8959))),'^0*',''),'13264'))

xb9 = '13254'

50   Pass
assert(isequal(regexprep(char(string(dec2missing5(9190))),'^0*',''),'13641'))

xb9 = '13541'

51   Pass
assert(isequal(regexprep(char(string(dec2missing5(9289))),'^0*',''),'13771'))

xb9 = '13661'

52   Pass
assert(isequal(regexprep(char(string(dec2missing5(9436))),'^0*',''),'13944'))

xb9 = '13844'

53   Pass
assert(isequal(regexprep(char(string(dec2missing5(9480))),'^0*',''),'14003'))

xb9 = '14003'

54   Pass
assert(isequal(regexprep(char(string(dec2missing5(9533))),'^0*',''),'14072'))

xb9 = '14062'

55   Pass
assert(isequal(regexprep(char(string(dec2missing5(9541))),'^0*',''),'14081'))

xb9 = '14071'

56   Pass
for n=1:100, assert(all(char(string(dec2missing5(randi(10000))))~='5')); end

xb9 = '3332' xb9 = '12175' xb9 = '3424' xb9 = '4025' xb9 = '2756' xb9 = '876' xb9 = '12164' xb9 = '10147' xb9 = '14500' xb9 = '6270' xb9 = '10328' xb9 = '7887' xb9 = '10725' xb9 = '7212' xb9 = '5516' xb9 = '14315' xb9 = '1017' xb9 = '11202' xb9 = '8874' xb9 = '8367' xb9 = '2658' xb9 = '4261' xb9 = '10222' xb9 = '10376' xb9 = '5566' xb9 = '11107' xb9 = '10026' xb9 = '8056' xb9 = '7317' xb9 = '3055' xb9 = '7601' xb9 = '74' xb9 = '5063' xb9 = '74' xb9 = '338' xb9 = '8414' xb9 = '8237' xb9 = '3050' xb9 = '10616' xb9 = '3783' xb9 = '13000' xb9 = '14541' xb9 = '2235' xb9 = '3185' xb9 = '14276' xb9 = '14532' xb9 = '505' xb9 = '1083' xb9 = '3286' xb9 = '8525' xb9 = '4572' xb9 = '14380' xb9 = '5754' xb9 = '5834' xb9 = '5834' xb9 = '8364' xb9 = '10264' xb9 = '5334' xb9 = '3105' xb9 = '5367' xb9 = '2522' xb9 = '7803' xb9 = '6251' xb9 = '11807' xb9 = '3240' xb9 = '5302' xb9 = '4756' xb9 = '10087' xb9 = '11785' xb9 = '10416' xb9 = '2141' xb9 = '1518' xb9 = '13686' xb9 = '1565' xb9 = '6041' xb9 = '5234' xb9 = '11003' xb9 = '11086' xb9 = '311' xb9 = '7464' xb9 = '8815' xb9 = '10312' xb9 = '1435' xb9 = '337' xb9 = '13225' xb9 = '11134' xb9 = '3286' xb9 = '3076' xb9 = '4543' xb9 = '12315' xb9 = '3301' xb9 = '10053' xb9 = '13461' xb9 = '13413' xb9 = '3041' xb9 = '6117' xb9 = '7144' xb9 = '10236' xb9 = '12646' xb9 = '13818'

57   Pass
assert(isempty(strfind(fileread('dec2missing5.m'),'13944')),'please do not use look-up table solutions');

Suggested Problems