This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(3))),'^0*',''),'3'))
y =
3
|
2 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(14))),'^0*',''),'16'))
y =
16
|
3 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(19))),'^0*',''),'21'))
y =
21
|
4 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(80))),'^0*',''),'99'))
y =
99
|
5 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(91))),'^0*',''),'111'))
y =
111
|
6 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(313))),'^0*',''),'388'))
y =
388
|
7 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(732))),'^0*',''),'1003'))
y =
1003
|
8 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(748))),'^0*',''),'1021'))
y =
1021
|
9 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(1249))),'^0*',''),'1738'))
y =
1738
|
10 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(1873))),'^0*',''),'2611'))
y =
2611
|
11 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(2790))),'^0*',''),'3840'))
y =
3840
|
12 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(3035))),'^0*',''),'4142'))
y =
4142
|
13 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(3391))),'^0*',''),'4688'))
y =
4688
|
14 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(3547))),'^0*',''),'4881'))
y =
4881
|
15 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(3724))),'^0*',''),'6098'))
y =
6098
|
16 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(4057))),'^0*',''),'6608'))
y =
6608
|
17 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(4221))),'^0*',''),'6810'))
y =
6810
|
18 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(4389))),'^0*',''),'7017'))
y =
7017
|
19 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(4444))),'^0*',''),'7088'))
y =
7088
|
20 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(4489))),'^0*',''),'7138'))
y =
7138
|
21 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(4530))),'^0*',''),'7193'))
y =
7193
|
22 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(4533))),'^0*',''),'7197'))
y =
7197
|
23 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(4569))),'^0*',''),'7237'))
y =
7237
|
24 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(4585))),'^0*',''),'7264'))
y =
7264
|
25 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(4651))),'^0*',''),'7338'))
y =
7338
|
26 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(4680))),'^0*',''),'7380'))
y =
7380
|
27 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(5455))),'^0*',''),'8431'))
y =
8431
|
28 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(5711))),'^0*',''),'8846'))
y =
8846
|
29 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(5949))),'^0*',''),'9140'))
y =
9140
|
30 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(5999))),'^0*',''),'9206'))
y =
9206
|
31 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(6075))),'^0*',''),'9300'))
y =
9300
|
32 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(6526))),'^0*',''),'9961'))
y =
9961
|
33 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(6601))),'^0*',''),'10044'))
y =
10044
|
34 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(6634))),'^0*',''),'10091'))
y =
10091
|
35 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(6728))),'^0*',''),'10206'))
y =
10206
|
36 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(6787))),'^0*',''),'10281'))
y =
10281
|
37 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(6902))),'^0*',''),'10419'))
y =
10419
|
38 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(7037))),'^0*',''),'10689'))
y =
10689
|
39 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(7212))),'^0*',''),'10903'))
y =
10903
|
40 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(7493))),'^0*',''),'11246'))
y =
11246
|
41 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(7962))),'^0*',''),'11927'))
y =
11927
|
42 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(7996))),'^0*',''),'11974'))
y =
11974
|
43 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(8062))),'^0*',''),'12048'))
y =
12048
|
44 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(8109))),'^0*',''),'12110'))
y =
12110
|
45 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(8248))),'^0*',''),'12284'))
y =
12284
|
46 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(8427))),'^0*',''),'12603'))
y =
12603
|
47 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(8538))),'^0*',''),'12737'))
y =
12737
|
48 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(8620))),'^0*',''),'12838'))
y =
12838
|
49 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(8959))),'^0*',''),'13264'))
y =
13264
|
50 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(9190))),'^0*',''),'13641'))
y =
13641
|
51 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(9289))),'^0*',''),'13771'))
y =
13771
|
52 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(9436))),'^0*',''),'13944'))
y =
13944
|
53 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(9480))),'^0*',''),'14003'))
y =
14003
|
54 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(9533))),'^0*',''),'14072'))
y =
14072
|
55 | Pass |
assert(isequal(regexprep(char(string(dec2missing5(9541))),'^0*',''),'14081'))
y =
14081
|
56 | Pass |
for n=1:100, assert(all(char(string(dec2missing5(randi(10000))))~='5')); end
y =
1184
y =
1380
y =
6632
y =
3871
y =
10446
y =
7018
y =
8660
y =
7842
y =
11688
y =
3677
y =
3060
y =
1947
y =
12431
y =
11221
y =
6374
y =
6237
y =
6394
y =
246
y =
10
y =
8300
y =
4880
y =
13367
y =
13311
y =
3190
y =
14741
y =
12441
y =
1474
y =
13728
y =
4767
y =
9080
y =
8142
y =
14349
y =
2072
y =
9037
y =
7881
y =
12066
y =
937
y =
2994
y =
1817
y =
10494
y =
6973
y =
9374
y =
12419
y =
471
y =
8249
y =
11718
y =
172
y =
13062
y =
10869
y =
7431
y =
6097
y =
9114
y =
8788
y =
6469
y =
6888
y =
12463
y =
899
y =
13013
y =
621
y =
11134
y =
7724
y =
12977
y =
10143
y =
9186
y =
12974
y =
3046
y =
13868
y =
11861
y =
10038
y =
291
y =
10229
y =
12929
y =
8063
y =
7187
y =
4412
y =
4932
y =
13678
y =
2092
y =
12766
y =
14373
y =
8011
y =
2983
y =
10600
y =
7907
y =
10147
y =
9607
y =
1172
y =
11097
y =
420
y =
7638
y =
10493
y =
3199
y =
6821
y =
6046
y =
11468
y =
10372
y =
7821
y =
12130
y =
797
y =
391
|
57 | Pass |
assert(isempty(strfind(fileread('dec2missing5.m'),'13944')),'please do not use look-up table solutions');
|
Given an unsigned integer x, find the largest y by rearranging the bits in x
780 Solvers
1763 Solvers
All your base are belong to us
463 Solvers
432 Solvers
525 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!