Cody

Solution 1972785

Submitted on 12 Oct 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   Fail
nocheat = isempty(regexp(evalc('type random_sequence'),'([^f]eval|regexprep|inline|str2func)')); m = 26; s = 5000; y = random_sequence(m,s); assert(isequal(sum(y),s) && abs(mean(y)-m/2)<m*sqrt(m/s)+1/2 && isequal(y,round(y)) && abs(std(y)-m/sqrt(12))*sqrt(s)/m<2.5 && nocheat)

l = 1 y = 100 214 343 209 22 331 196 169 335 153 265 235 144 344 128 327 329 115 76 86 169 16 104 137 246 207

Assertion failed.

2   Fail
nocheat = isempty(regexp(evalc('type random_sequence'),'([^f]eval|regexprep|inline|str2func)')); m = 2; s = 1000; y = random_sequence(m,s); assert(isequal(sum(y),s) && abs(mean(y)-m/2)<m*sqrt(m/s)+1/2 && isequal(y,round(y)) && abs(std(y)-m/sqrt(12))*sqrt(s)/m<2.5 && nocheat)

l = 1 y = 601 399

Assertion failed.

3   Fail
nocheat = isempty(regexp(evalc('type random_sequence'),'([^f]eval|regexprep|inline|str2func)')); m = 1000; s = 100000; y = random_sequence(m,s); assert(isequal(sum(y),s) && abs(mean(y)-m/2)<m*sqrt(m/s)+1/2 && isequal(y,round(y)) && abs(std(y)-m/sqrt(12))*sqrt(s^1/m^3)<1 && nocheat)

l = 1 y = Columns 1 through 30 10 114 74 8 54 123 88 158 181 60 16 25 10 190 86 63 186 169 173 81 38 93 38 198 88 102 135 100 104 83 Columns 31 through 60 126 103 138 98 8 10 86 154 158 74 102 18 3 154 29 167 6 109 148 156 177 12 112 116 170 164 56 11 39 127 Columns 61 through 90 117 110 74 72 134 142 165 17 32 38 90 38 168 1 82 73 54 169 145 1 83 17 193 70 156 30 101 195 197 193 Columns 91 through 120 174 163 131 145 197 180 71 171 66 36 1 147 149 31 154 191 51 97 149 190 44 28 161 48 50 50 6 10 179 150 Columns 121 through 150 72 155 153 139 171 78 91 84 172 59 16 33 34 169 149 193 196 85 196 10 128 110 151 3 85 90 111 134 47 187 Columns 151 through 180 145 82 7 123 112 130 124 125 166 44 171 76 115 39 191 124 141 38 196 112 19 76 28 33 113 21 152 45 24 102 Columns 181 through 210 109 73 150 187 138 63 61 75 115 65 32 96 67 7 69 32 132 87 177 177 121 2 80 194 143 90 194 47 124 22 Columns 211 through 240 144 181 180 71 44 131 170 171 14 171 71 117 61 191 27 200 187 116 193 60 165 122 39 190 97 26 176 94 2 190 Columns 241 through 270 113 54 104 93 5 80 121 92 114 139 60 99 189 133 21 174 111 112 91 139 137 77 108 51 119 142 64 26 137 42 Columns 271 through 300 116 9 27 22 27 120 75 132 178 187 189 111 49 146 180 166 110 104 188 144 85 112 156 175 160 196 73 29 196 41 Columns 301 through 330 38 76 20 118 199 60 92 144 130 199 58 33 7 79 178 141 44 38 78 27 31 41 52 61 4 25 152 94 110 16 Columns 331 through 360 19 84 76 195 115 176 114 52 63 190 196 154 14 79 52 35 13 196 195 73 9 39 190 133 71 184 177 23 5 8 Columns 361 through 390 176 92 122 63 192 107 35 109 53 67 120 120 179 70 25 193 28 152 185 126 155 44 161 142 106 31 72 191 26 196 Columns 391 through 420 27 2 196 140 92 57 56 127 167 122 131 55 119 140 82 13 16 167 198 155 182 164 104 129 56 147 183 131 53 45 Columns 421 through 450 160 30 61 18 197 66 184 144 80 91 11 3 199 166 140 115 162 177 165 184 161 148 82 98 149 33 93 143 114 110 Columns 451 through 480 121 98 31 146 177 170 30 117 195 138 8 181 165 180 90 154 175 33 1 57 83 100 148 123 195 17 192 115 67 150 Columns 481 through 510 169 38 193 85 167 119 54 136 56 46 110 134 162 21 100 150 38 104 89 131 119 116 186 181 83 32 87 10 105 98 Columns 511 through 540 5 47 30 179 161 14 154 126 6 140 87 165 100 128 106 99 148 196 37 59 200 123 117 172 83 79 78 96 29 170 Columns 541 through 570 87 117 28 42 16 180 53 1 87 90 94 155 92 163 99 1 80 131 11 71 59 122 116 19 107 95 2 16 139 27 Columns 571 through 600 107 132 64 6 44 9 101 199 63 101 80 24 113 138 29 164 200 189 163 185 104 149 178 99 200 170 2 125 94 28 Columns 601 through 630 60 30 186 154 72 4 35 148 95 9 86 33 92 88 99 148 142 49 7 90 163 37 49 81 58 10 191 120 11 44 Columns 631 through 660 157 65 84 22 37 61 19 111 93 69 97 54 21 135 140 97 134 54 7 106 156 107 158 126 27 6 167 122 13 70 Columns 661 through 690 21 24 90 124 43 181 148 146 88 137 116 197 20 133 145 141 54 67 175 180 36 104 163 35 143 121 100 186 5 93 Columns 691 through 720 147 130 109 43 186 154 13 144 137 61 43 5 174 115 131 133 82 47 75 130 197 47 185 7 36 58 70 71 169 98 Columns 721 through 750 8 65 106 113 98 157 122 49 129 4 140 18 49 6 126 156 102 197 200 88 15 37 81 172 155 170 135 136 171 4 Columns 751 through 780 52 161 27 65 138 115 144 194 122 194 175 107 13 105 48 8 74 172 46 60 85 147 132 118 28 35 73 152 110 155 Columns 781 through 810 8 132 5 47 27 34 141 154 142 179 106 82 57 21 41 195 133 15 143 171 40 124 169 127 165 172 18 52 74 142 Columns 811 through 840 197 196 173 69 66 112 112 57 121 169 64 104 126 147 171 3 17 18 109 100 172 137 86 18 24 54 42 135 21 84 Columns 841 through 870 7 192 129 59 22 10 14 138 144 20 46 171 101 157 184 63 87 107 56 27 93 18 30 51 78 120 36 182 99 52 Columns 871 through 900 50 141 178 78 74 139 50 99 198 26 96 65 120 25 117 42 7 103 146 109 35 162 179 19 96 47 53 61 133 136 Columns 901 through 930 195 104 37 165 139 182 149 193 91 20 96 52 184 52 156 82 114 64 30 78 128 157 92 188 38 59 61 20 83 55 Columns 931 through 960 27 75 151 19 186 136 156 143 126 19 64 48 33 129 104 3 143 66 139 181 47 71 2 146 87 150 170 107 152 157 Columns 961 through 990 61 109 102 119 184 165 171 74 142 108 15 124 50 132 3 36 134 51 133 17 44 35 83 44 161 180 175 146 118 122 Columns 991 through 1000 5 109 197 182 124 3 157 8 63 99

Assertion failed.

Suggested Problems

More from this Author31