Cody

Solution 875315

Submitted on 15 Apr 2016 by Jonathan
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 = 1000:2000; v = find_vampire(x); v_correct = [1260 1395 1435 1530 1827]; assert(isequal(v,v_correct))

27, 81, 2187 81, 27, 2187 21, 60, 1260 21, 87, 1827 30, 51, 1530 93, 15, 1395 41, 35, 1435 86, 80, 6880

2   Pass
x = 1:999; v = find_vampire(x); assert(isempty(v))

3   Pass
x = reshape(2000:2999,100,[]); v = find_vampire(x); v_correct = 2187; assert(isequal(v,v_correct))

27, 81, 2187 81, 27, 2187 21, 60, 1260 21, 87, 1827 30, 51, 1530 93, 15, 1395 41, 35, 1435 86, 80, 6880

4   Pass
x = []; v = find_vampire(x); assert(isempty(v))

5   Pass
x = -2000:-1000; v = find_vampire(x); assert(isempty(v))

6   Pass
x = 125000:125501; v = find_vampire(x); v_correct = [125248 125433 125460 125500]; assert(isequal(v,v_correct))

135, 801, 108135 216, 864, 186624 216, 981, 211896 225, 801, 180225 225, 810, 182250 252, 801, 201852 261, 486, 126846 261, 585, 152685 270, 810, 218700 315, 423, 133245 342, 963, 329346 351, 387, 135837 351, 414, 145314 351, 900, 315900 351, 909, 319059 360, 936, 336960 369, 981, 361989 387, 351, 135837 396, 414, 163944 414, 351, 145314 414, 396, 163944 423, 315, 133245 432, 891, 384912 468, 612, 286416 468, 891, 416988 486, 261, 126846 540, 846, 456840 549, 891, 489159 585, 261, 152685 585, 630, 368550 612, 468, 286416 630, 585, 368550 630, 855, 538650 657, 864, 567648 720, 936, 673920 765, 963, 736695 801, 135, 108135 801, 225, 180225 801, 252, 201852 810, 225, 182250 810, 270, 218700 846, 540, 456840 855, 630, 538650 855, 927, 792585 864, 216, 186624 864, 657, 567648 891, 432, 384912 891, 468, 416988 891, 549, 489159 891, 909, 809919 891, 945, 841995 900, 351, 315900 909, 351, 319059 909, 891, 809919 927, 855, 792585 936, 360, 336960 936, 720, 673920 945, 891, 841995 963, 342, 329346 963, 765, 736695 981, 216, 211896 981, 369, 361989 146, 938, 136948 281, 443, 124483 281, 650, 182650 317, 425, 134725 317, 461, 146137 371, 470, 174370 425, 317, 134725 443, 281, 124483 461, 317, 146137 461, 524, 241564 470, 371, 174370 470, 542, 254740 524, 461, 241564 524, 623, 326452 533, 641, 341653 533, 686, 365638 542, 470, 254740 623, 524, 326452 641, 533, 341653 641, 650, 416650 650, 281, 182650 650, 641, 416650 650, 704, 457600 650, 875, 568750 650, 983, 638950 686, 533, 365638 704, 650, 457600 776, 992, 769792 875, 650, 568750 875, 902, 789250 902, 875, 789250 938, 146, 136948 983, 650, 638950 992, 776, 769792 156, 942, 146952 165, 951, 156915 201, 510, 102510 201, 600, 120600 201, 627, 126027 201, 897, 180297 210, 501, 105210 210, 600, 126000 210, 870, 182700 210, 906, 190260 210, 915, 192150 246, 510, 125460 255, 807, 205785 300, 501, 150300 300, 510, 153000 327, 591, 193257 336, 951, 319536 381, 969, 369189 435, 870, 378450 489, 582, 284598 516, 204, 105264 534, 231, 123354 534, 591, 315594 543, 231, 125433 570, 834, 475380 588, 231, 135828 588, 951, 559188 615, 204, 125460 624, 780, 486720 651, 240, 156240 678, 321, 217638 678, 420, 284760 705, 150, 105750 750, 231, 173250 750, 906, 679500 759, 231, 175329 759, 681, 516879 822, 276, 226872 831, 465, 386415 840, 141, 118440 840, 546, 458640 858, 951, 815958 876, 843, 738468 894, 906, 809964 930, 150, 139500 948, 366, 346968 957, 825, 789525 975, 321, 312975 984, 807, 794088 140, 926, 129640 158, 701, 110758 167, 701, 117067 176, 926, 162976 221, 782, 172822 248, 881, 218488 248, 926, 229648 275, 719, 197725 284, 926, 262984 311, 422, 131242 320, 926, 296320 338, 692, 233896 356, 431, 153436 356, 926, 329656 383, 971, 371893 392, 863, 338296 392, 926, 362992 401, 260, 104260 401, 350, 140350 410, 323, 132430 410, 350, 143500 437, 602, 263074 446, 908, 404968 464, 926, 429664 473, 800, 378400 482, 890, 428980 491, 395, 193945 491, 845, 414895 500, 251, 125500 545, 899, 489955 563, 953, 536539 572, 926, 529672 581, 269, 156289 581, 422, 245182 590, 845, 498550 608, 251, 152608 626, 341, 213466 635, 215, 136525 635, 530, 336550 662, 593, 392566 671, 323, 216733 680, 926, 629680 707, 431, 304717 725, 161, 116725 725, 179, 129775 725, 350, 253750 725, 431, 312475 761, 152, 115672 788, 926, 729688 806, 323, 260338 824, 152, 125248 842, 269, 226498 851, 296, 251896 860, 251, 215860 860, 800, 688000 878, 431, 378418 896, 926, 829696 941, 476, 447916 986, 953, 939658