Cody

Solution 1324226

Submitted on 2 Nov 2017 by Peng Liu
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
assessFunctionAbsence({'horzcat','vertcat','char','tic','toc','delete','str2num','fopen','regexp','regexpi','regexprep','rng','assert','!','system','unix','figure'},'FileName','lucky.m');

2   Pass
fid=fopen('lucky.m','r','n','US-ASCII'); str=fread(fid,'*char').'; assert(length(str)<25000); assert(isempty(regexp(str,'[\r\n;, ]+!')));

3   Pass
lucky([]); fid=fopen('luckyTest.p','Wb'); fwrite(fid,str2num(['[118 48 48 46 48 48 118 48 48 46 48 48 0 4 144 28 164 79 31'... ' 181 0 0 0 75 0 0 0 144 0 0 0 190 141 122 182 196 246 214 83 209 188 114 221'... ' 133 197 147 17 234 99 73 193 98 152 38 155 52 251 250 28 66 253 209 9 177 '... '255 155 78 197 239 82 48 145 6 26 125 43 176 171 165 121 249 19 63 213 105 '... '31 179 114 39 113 75 207 16 200 133 180 56 143 164 251 173 46 7 63 221 205 '... '208 233 113 250 244 105 142 107 211 121 250 246 7 146 101 152 113 160 185 '... '186 57 18 151 224 103 224 196 10 188 214 232 173 15 223 141 230 78 165 31 '... '65 133 137 11 60 123 144 67 140 64 2 39 104 204 118 88 116 109 185 202 231 '... '219 254 45 0 146 24 47 74 201 124]'])); fclose(fid); luckyTest();

Suggested Problems