Cody

Solution 2067503

Submitted on 23 Dec 2019
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
assert(isequal(regexprep(char(string(dec2missing5(3))),'^0*',''),'3'))

3

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

16

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

22

Assertion failed.

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

96

Assertion failed.

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

109

Assertion failed.

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

375

Assertion failed.

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

878

Assertion failed.

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

897

Assertion failed.

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

1498

Assertion failed.

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

2247

Assertion failed.

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

3348

Assertion failed.

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

3642

Assertion failed.

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

4069

Assertion failed.

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

4256

Assertion failed.

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

4468

Assertion failed.

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

4868

Assertion failed.

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

5065

Assertion failed.

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

5266

Assertion failed.

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

5332

Assertion failed.

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

5386

Assertion failed.

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

5436

Assertion failed.

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

5439

Assertion failed.

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

5482

Assertion failed.

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

5502

Assertion failed.

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

5581

Assertion failed.

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

5616

Assertion failed.

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

6546

Assertion failed.

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

6853

Assertion failed.

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

7138

Assertion failed.

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

7198

Assertion failed.

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

7290

Assertion failed.

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

7831

Assertion failed.

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

7921

Assertion failed.

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

7960

Assertion failed.

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

8073

Assertion failed.

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

8144

Assertion failed.

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

8282

Assertion failed.

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

8444

Assertion failed.

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

8654

Assertion failed.

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

8991

Assertion failed.

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

9554

Assertion failed.

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

9595

Assertion failed.

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

9674

Assertion failed.

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

9730

Assertion failed.

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

9897

Assertion failed.

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

10112

Assertion failed.

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

10245

Assertion failed.

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

10344

Assertion failed.

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

10750

Assertion failed.

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

11028

Assertion failed.

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

11146

Assertion failed.

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

11323

Assertion failed.

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

11376

Assertion failed.

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

11439

Assertion failed.

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

11449

Assertion failed.

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

6928 7396 136 1809 10766 2725

Assertion failed.

57   Fail
x='1000'; for n=1:7, x=char(string(dec2missing5(str2double(x)))); end; assert(isequal(regexprep(x,'^0*',''),'11027'));

1200 1440 1728 2073 2487 2984 3580

Assertion failed.

58   Fail
x='234'; for n=1:10, x=char(string(dec2missing5(str2double(x)))); end; assert(isequal(regexprep(x,'^0*',''),'4240'));

280 336 403 483 579 694 832 998 1197 1436

Assertion failed.

59   Pass
assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[13944,14003,14072,14081]),regexp(fileread('dec2missing5.m'),'((\s*[\+\-\*\/]\s*)?[\d\.])+','match'))),'please do not use look-up table solutions');