Cody

Solution 488720

Submitted on 20 Aug 2014 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=[1 2]; y=1; y_correct=[1 2]; assert(isequal(muldif(x,y),y_correct));

p = 1 2

2   Pass
%% x=1; y=1; y_correct=1; assert(isequal(muldif(x,y),y_correct));

p = 1

3   Pass
%% x=[1 2 0 1]; y=[8 5 1]; y_correct = [8 21 11 10 5 1]; assert(isequal(muldif(x,y),y_correct))

p = 0 0 1 2 0 1 p = 0 5 11 2 5 1 p = 8 21 11 10 5 1

4   Pass
%% x=[1 2 3 4 4 1 2 1 1 1]; y=[1 2 3 4 5 6 9 10]; y_correct=[1 4 10 20 34 49 68 90 104 109 101 73 43 40 25 19 10]; assert(isequal(muldif(x,y),y_correct));

p = Columns 1 through 16 0 0 0 0 0 0 0 10 20 30 40 40 10 20 10 10 Column 17 10 p = Columns 1 through 16 0 0 0 0 0 0 9 28 47 66 76 49 28 29 19 19 Column 17 10 p = Columns 1 through 16 0 0 0 0 0 6 21 46 71 90 82 61 34 35 25 19 Column 17 10 p = Columns 1 through 16 0 0 0 0 5 16 36 66 91 95 92 66 39 40 25 19 Column 17 10 p = Columns 1 through 16 0 0 0 4 13 28 52 82 95 103 96 70 43 40 25 19 Column 17 10 p = Columns 1 through 16 0 0 3 10 22 40 64 85 101 106 99 73 43 40 25 19 Column 17 10 p = Columns 1 through 16 0 2 7 16 30 48 66 89 103 108 101 73 43 40 25 19 Column 17 10 p = Columns 1 through 16 1 4 10 20 34 49 68 90 104 109 101 73 43 40 25 19 Column 17 10

5   Pass
%% x=[1:10 0 1]; y=[8 5:1:25 1]; y_correct = [8 21 40 66 100 143 196 260 336 425 440 503 555 611 667 723 779 835 891 947 1003 1059 1090 1094 1070 1017 934 820 674 495 282 34 25 1 ]; assert(isequal(muldif(x,y),y_correct))

p = 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 1 2 3 4 5 6 7 8 9 10 Columns 33 through 34 0 1 p = 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 25 51 77 103 129 155 181 207 233 259 10 Columns 33 through 34 25 1 p = 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 24 73 123 173 223 273 323 373 423 473 259 34 Columns 33 through 34 25 1 p = 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 23 70 142 215 288 361 434 507 580 653 473 282 34 Columns 33 through 34 25 1 p = 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 22 67 136 230 325 420 515 610 705 800 653 495 282 34 Columns 33 through 34 25 1 p = 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 21 64 130 220 335 451 567 683 799 915 800 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 17 through 32 20 61 124 210 320 455 591 727 863 999 915 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 0 0 0 0 Columns 9 through 16 0 0 0 0 0 0 0 19 Columns 17 through 24 58 118 200 305 434 588 743 898 Columns 25 through 32 1053 999 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 0 0 0 0 Columns 9 through 16 0 0 0 0 0 0 18 55 Columns 17 through 24 112 190 290 413 560 732 905 1078 Columns 25 through 32 1053 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 0 0 0 0 Columns 9 through 16 0 0 0 0 0 17 52 106 Columns 17 through 24 180 275 392 532 696 885 1075 1078 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 0 0 0 0 Columns 9 through 16 0 0 0 0 16 49 100 170 Columns 17 through 24 260 371 504 660 840 1045 1075 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 0 0 0 0 Columns 9 through 16 0 0 0 15 46 94 160 245 Columns 17 through 24 350 476 624 795 990 1045 1090 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 0 0 0 0 Columns 9 through 16 0 0 14 43 88 150 230 329 Columns 17 through 24 448 588 750 935 990 1059 1090 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 0 0 0 0 Columns 9 through 16 0 13 40 82 140 215 308 420 Columns 17 through 24 552 705 880 935 1003 1059 1090 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 0 0 0 0 Columns 9 through 16 12 37 76 130 200 287 392 516 Columns 17 through 24 660 825 880 947 1003 1059 1090 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 0 0 0 11 Columns 9 through 16 34 70 120 185 266 364 480 615 Columns 17 through 24 770 825 891 947 1003 1059 1090 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 0 0 10 31 Columns 9 through 16 64 110 170 245 336 444 570 715 Columns 17 through 24 770 835 891 947 1003 1059 1090 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 0 9 28 58 Columns 9 through 16 100 155 224 308 408 525 660 715 Columns 17 through 24 779 835 891 947 1003 1059 1090 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 0 8 25 52 90 Columns 9 through 16 140 203 280 372 480 605 660 723 Columns 17 through 24 779 835 891 947 1003 1059 1090 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 0 7 22 46 80 125 Columns 9 through 16 182 252 336 435 550 605 667 723 Columns 17 through 24 779 835 891 947 1003 1059 1090 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 0 6 19 40 70 110 161 Columns 9 through 16 224 300 390 495 550 611 667 723 Columns 17 through 24 779 835 891 947 1003 1059 1090 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1 through 8 0 5 16 34 60 95 140 196 Columns 9 through 16 264 345 440 495 555 611 667 723 Columns 17 through 24 779 835 891 947 1003 1059 1090 1094 Columns 25 through 32 1070 1017 934 820 674 495 282 34 Columns 33 through 34 25 1 p = Columns 1...

Suggested Problems

More from this Author21