Cody

# Problem 44375. Missing five

Solution 2083767

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

Assertion failed.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Assertion failed.

59   Pass