Cody

Solution 1403450

Submitted on 3 Jan 2018 by Martin C.
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
n = 2; p_correct = 1; assert(isequal(factor_digits(n),p_correct))

pl = 2 y = 0 f = 2

2   Pass
n = 26; p_correct = [1 0 0 0 0 1]; assert(isequal(factor_digits(n),p_correct))

pl = 2 3 5 7 11 13 17 19 23 y = 0 0 0 0 0 0 0 0 0 f = 2 13 c = 8 c = 7 c = 6

3   Pass
n = 168; p_correct = [1 0 1 3]; assert(isequal(factor_digits(n),p_correct))

pl = Columns 1 through 29 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 Columns 30 through 39 113 127 131 137 139 149 151 157 163 167 y = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 39 0 0 0 0 0 0 0 0 0 0 f = 2 2 2 3 7 c = 38 c = 37 c = 36 c = 35 c = 34 c = 33 c = 32 c = 31 c = 30 c = 29 c = 28 c = 27 c = 26 c = 25 c = 24 c = 23 c = 22 c = 21 c = 20 c = 19 c = 18 c = 17 c = 16 c = 15 c = 14 c = 13 c = 12 c = 11 c = 10 c = 9 c = 8 c = 7 c = 6 c = 5 c = 4

4   Pass
n = 999; p_correct = [1 0 0 0 0 0 0 0 0 0 3 0]; assert(isequal(factor_digits(n),p_correct))

pl = Columns 1 through 29 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 Columns 30 through 58 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 Columns 59 through 87 277 281 283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 Columns 88 through 116 457 461 463 467 479 487 491 499 503 509 521 523 541 547 557 563 569 571 577 587 593 599 601 607 613 617 619 631 641 Columns 117 through 145 643 647 653 659 661 673 677 683 691 701 709 719 727 733 739 743 751 757 761 769 773 787 797 809 811 821 823 827 829 Columns 146 through 168 839 853 857 859 863 877 881 883 887 907 911 919 929 937 941 947 953 967 971 977 983 991 997 y = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 58 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 59 through 87 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 88 through 116 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 117 through 145 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 146 through 168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f = 3 3 3 37 c = 167 c = 166 c = 165 c = 164 c = 163 c = 162 c = 161 c = 160 c = 159 c = 158 c = 157 c = 156 c = 155 c = 154 c = 153 c = 152 c = 151 c = 150 c = 149 c = 148 c = 147 c = 146 c = 145 c = 144 c = 143 c = 142 c = 141 c = 140 c = 139 c = 138 c = 137 c = 136 c = 135 c = 134 c = 133 c = 132 c = 131 c = 130 c = 129 c = 128 c = 127 c = 126 c = 125 c = 124 c = 123 c = 122 c = 121 c = 120 c = 119 c = 118 c = 117 c = 116 c = 115 c = 114 c = 113 c = 112 c = 111 c = 110 c = 109 c = 108 c = 107 c = 106 c = 105 c = 104 c = 103 c = 102 c = 101 c = 100 c = 99 c = 98 c = 97 c = 96 c = 95 c = 94 c = 93 c = 92 c = 91 c = 90 c = 89 c = 88 c = 87 c = 86 c = 85 c = 84 c = 83 c = 82 c = 81 c = 80 c = 79 c = 78 c = 77 c = 76 c = 75 c = 74 c = 73 c = 72 c = 71 c = 70 c = 69 c = 68 c = 67 c = 66 c = 65 c = 64 c = 63 c = 62 c = 61 c = 60 c = 59 c = 58 c = 57 c = 56 c = 55 c = 54 c = 53 c = 52 c = 51 c = 50 c = 49 c = 48 c = 47 c = 46 c = 45 c = 44 c = 43 c = 42 c = 41 c = 40 c = 39 c = 38 c = 37 c = 36 c = 35 c = 34 c = 33 c = 32 c = 31 c = 30 c = 29 c = 28 c = 27 c = 26 c = 25 c = 24 c = 23 c = 22 c = 21 c = 20 c = 19 c = 18 c = 17 c = 16 c = 15 c = 14 c = 13 c = 12

Suggested Problems

More from this Author95