Cody

# Problem 553. How to multiply?

Solution 669297

Submitted on 12 May 2015 by goc3
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
%% X='170000000000000000000000000000'; Y='190000000000000000000000000000'; Z='32300000000000000000000000000000000000000000000000000000000'; assert(isequal(Z,ylpitlum(X,Y)))

v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 81 through 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 97 through 100 0 0 0 0 v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 81 through 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 97 through 100 0 0 0 0 v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 81 through 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 97 through 100 0 0 0 0 v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Column 33 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 81 through 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 97 through 100 0 0 0 0 v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 34 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 81 through 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 97 through 100 0 0 0 0 v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 35 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 81 through 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 97 through 100 0 0 0 0 v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 36 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 81 through 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 97 through 100 0 0 0 0 v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 37 0 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 81 through 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 97 through 100 0 0 0 0 v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 38 0 0 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 81 through 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 97 through 100 0 0 0 0 v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 39 0 0 0 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 ...

2   Pass
%% X='7657534422342987897979879745232234'; Y='9878765654343431233130980808776767'; Z='75646988048394475543709477144832189651639589891288011407029878707478'; assert(isequal(Z,ylpitlum(X,Y)))

v2 = Columns 1 through 16 49 42 35 49 35 21 28 28 14 14 21 28 14 63 56 49 Columns 17 through 32 56 63 49 63 49 63 56 49 63 49 28 35 14 21 14 14 Columns 33 through 34 21 28 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 0 0 49 42 35 49 35 21 28 28 14 14 21 28 14 63 Columns 81 through 96 56 49 56 63 49 63 49 63 56 49 63 49 28 35 14 21 Columns 97 through 100 14 14 21 28 v2 = Columns 1 through 16 42 36 30 42 30 18 24 24 12 12 18 24 12 54 48 42 Columns 17 through 32 48 54 42 54 42 54 48 42 54 42 24 30 12 18 12 12 Columns 33 through 35 18 24 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 0 42 85 72 77 79 53 45 52 40 26 32 45 40 68 111 Columns 81 through 96 98 97 110 105 103 105 103 111 98 103 105 73 58 47 32 33 Columns 97 through 100 26 32 45 28 v2 = Columns 1 through 16 49 42 35 49 35 21 28 28 14 14 21 28 14 63 56 49 Columns 17 through 32 56 63 49 63 49 63 56 49 63 49 28 35 14 21 14 14 Columns 33 through 36 21 28 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 65 through 80 49 84 120 121 112 100 81 73 66 54 47 60 59 103 124 160 Columns 81 through 96 154 160 159 168 152 168 159 160 161 152 133 108 72 68 46 47 Columns 97 through 100 47 60 45 28 v2 = Columns 1 through 16 42 36 30 42 30 18 24 24 12 12 18 24 12 54 48 42 Columns 17 through 32 48 54 42 54 42 54 48 42 54 42 24 30 12 18 12 12 Columns 33 through 37 18 24 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 42 Columns 65 through 80 85 114 162 151 130 124 105 85 78 72 71 72 113 151 166 208 Columns 81 through 96 208 202 213 210 206 216 201 214 203 176 163 120 90 80 58 65 Columns 97 through 100 71 60 45 28 v2 = Columns 1 through 16 49 42 35 49 35 21 28 28 14 14 21 28 14 63 56 49 Columns 17 through 32 56 63 49 63 49 63 56 49 63 49 28 35 14 21 14 14 Columns 33 through 38 21 28 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 49 84 Columns 65 through 80 120 163 197 172 158 152 119 99 99 100 85 135 169 200 222 271 Columns 81 through 96 257 265 262 273 262 265 264 263 231 211 177 141 104 94 79 93 Columns 97 through 100 71 60 45 28 v2 = Columns 1 through 16 49 42 35 49 35 21 28 28 14 14 21 28 14 63 56 49 Columns 17 through 32 56 63 49 63 49 63 56 49 63 49 28 35 14 21 14 14 Columns 33 through 39 21 28 0 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 0 49 91 119 Columns 65 through 80 169 198 218 200 186 166 133 120 127 114 148 191 218 256 285 320 Columns 81 through 96 320 314 325 329 311 328 313 291 266 225 198 155 118 115 107 93 Columns 97 through 100 71 60 45 28 v2 = Columns 1 through 16 56 48 40 56 40 24 32 32 16 16 24 32 16 72 64 56 Columns 17 through 32 64 72 56 72 56 72 64 56 72 56 32 40 16 24 16 16 Columns 33 through 40 24 32 0 0 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 56 97 131 175 Columns 65 through 80 209 222 250 232 202 182 157 152 143 186 212 247 282 328 341 392 Columns 81 through 96 376 386 389 385 383 384 345 331 282 249 214 171 142 147 107 93 Columns 97 through 100 71 60 45 28 v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 41 0 0 0 0 0 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 0 0 56 97 131 175 Columns 65 through 80 209 222 250 232 202 182 157 152 143 186 212 247 282 328 341 392 Columns 81 through 96 376 386 389 385 383 384 345 331 282 249 214 171 142 147 107 93 Columns 97 through 100 71 60 45 28 v2 = Columns 1 through 16 56 48 40 56 40 24 32 32 16 16 24 32 16 72 64 56 Columns 17 through 32 64 72 56 72 56 72 64 56 72 56 32 40 16 24 16 16 Columns 33 through 42 24 32 0 0 0 0 0 0 0 0 s = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 49 through 64 0 0 0 0 0 0 0 0 0 0 56 48 96 153 171 199 Columns 65 through 80 241 254 266 248 226 214 173 224 207 242 276 319 338 400 397 464 Columns 81 through 96 440 442 461 441 415 424 361 355 298 265 238 203 142 147 107 93 Columns 97 through 100 71 60 45 28 v2 = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 0 0 0 0 0 0 0 0 0 0 0 0 ...