Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    It's strange, but with my code, that i wrote, i've got "Passed: 80 Failed: 25". Lists with len(16) are passed, lists with len(18) are failed. And it's random! Python 3. Is it broken?
    An example, this has passed: input: [[802, 915, 549, 341, 85, 584, 488, 22, 635, 506, 892, 12, 123, 437], [568, 429, 451, 887, 299, 477, 927, 304, 621, 926, 712, 973, 403, 328], [786, 210, 427, 684, 107, 598, 129, 726, 69, 924, 507, 220, 456, 207], [591, 519, 624, 431, 209, 294, 906, 653, 293, 800, 159, 26, 701, 11], [355, 330, 793, 21, 899, 746, 849, 882, 462, 502, 631, 999, 180, 260], [2, 206, 252, 439, 178, 973, 742, 773, 824, 291, 203, 105, 255, 754], [994, 301, 192, 527, 424, 92, 619, 246, 829, 717, 587, 952, 111, 152], [384, 137, 272, 897, 300, 788, 883, 870, 695, 323, 523, 292, 857, 932], [689, 864, 744, 785, 266, 587, 934, 344, 318, 854, 884, 348, 463, 334], [227, 158, 201, 376, 812, 448, 297, 177, 653, 397, 125, 938, 244, 528], [541, 761, 803, 649, 712, 504, 835, 624, 994, 917, 933, 70, 463, 488], [843, 172, 402, 271, 880, 765, 949, 575, 418, 371, 730, 812, 1000, 257], [608, 157, 491, 265, 451, 769, 494, 270, 228, 64, 671, 70, 312, 166], [46, 111, 44, 22, 977, 186, 60, 832, 622, 751, 269, 631, 88, 873]]

    And this has failed: input: [[422, 174, 706, 259, 313, 749, 867, 853, 941, 506, 238, 946, 814, 285], [503, 542, 866, 376, 171, 168, 636, 831, 232, 616, 947, 715, 972, 35], [176, 161, 635, 451, 396, 218, 104, 841, 28, 691, 60, 515, 446, 472], [462, 505, 285, 553, 588, 54, 333, 783, 299, 902, 527, 27, 176, 367], [158, 692, 663, 977, 105, 669, 234, 196, 502, 780, 984, 937, 646, 534], [833, 749, 216, 31, 812, 197, 842, 353, 206, 333, 704, 159, 941, 406], [275, 547, 722, 854, 11, 600, 38, 389, 600, 397, 547, 64, 951, 878], [432, 301, 185, 725, 98, 529, 657, 965, 585, 649, 709, 209, 73, 779], [916, 628, 528, 963, 763, 789, 171, 663, 587, 116, 786, 561, 547, 252], [256, 415, 909, 443, 823, 844, 194, 59, 698, 698, 605, 390, 349, 235], [159, 919, 298, 145, 898, 327, 636, 468, 889, 540, 611, 962, 348, 57], [10, 596, 87, 659, 452, 157, 1, 327, 380, 636, 250, 330, 884, 3], [42, 401, 643, 250, 515, 208, 476, 394, 312, 402, 138, 810, 716, 68], [863, 28, 828, 572, 23, 821, 402, 129, 841, 99, 818, 428, 171, 647]]

    output: [422, 174, 706, 259, 313, 749, 867, 853, 941, 506, 238, 946, 814, 285, 35, 472, 367, 534, 406, 878, 779, 252, 235, 57, 3, 68, 647, 171, 428, 818, 99, 841, 129, 402, 821, 23, 572, 828, 28, 863, 42, 10, 159, 256, 916, 432, 275, 833, 158, 462, 176, 503, 542, 866, 376, 171, 168, 636, 831, 232, 616, 947, 715, 972, 446, 176, 646, 941, 951, 73, 547, 349, 348, 884, 716, 810, 138, 402, 312, 394, 476, 208, 515, 250, 643, 401, 596, 919, 415, 628, 301, 547, 749, 692, 505, 161, 635, 451, 396, 218, 104, 841, 28, 691, 60, 515, 27, 937, 159, 64, 209, 561, 390, 962, 330, 250, 636, 380, 327, 1, 157, 452, 659, 87, 298, 909, 528, 185, 722, 216, 663, 285, 553, 588, 54, 333, 783, 299, 902, 527, 984, 704, 547, 709, 786, 605, 611, 540, 889, 468, 636, 327, 898, 145, 443, 963, 725, 854, 31, 977, 105, 669, 234, 196, 502, 780, 333, 397, 649, 116, 698, 698, 59, 194, 844, 823, 763, 98, 11, 812, 197, 842, 353, 206, 600, 585, 587, 663, 171, 789, 529, 38, 389, 600, 965, 657] should equal [422, 174, 706, 259, 313, 749, 867, 853, 941, 506, 238, 946, 814, 285, 35, 472, 367, 534, 406, 878, 779, 252, 235, 57, 3, 68, 647, 171, 428, 818, 99, 841, 129, 402, 821, 23, 572, 828, 28, 863, 42, 10, 159, 256, 916, 432, 275, 833, 158, 462, 176, 503, 542, 866, 376, 171, 168, 636, 831, 232, 616, 947, 715, 972, 446, 176, 646, 941, 951, 73, 547, 349, 348, 884, 716, 810, 138, 402, 312, 394, 476, 208, 515, 250, 643, 401, 596, 919, 415, 628, 301, 547, 749, 692, 505, 161, 635, 451, 396, 218, 104, 841, 28, 691, 60, 515, 27, 937, 159, 64, 209, 561, 390, 962, 330, 250, 636, 380, 327, 1, 157, 452, 659, 87, 298, 909, 528, 185, 722, 216, 663, 285, 553, 588, 54, 333, 783, 299, 902, 527, 984, 704, 547, 709, 786, 605, 611, 540, 889, 468, 636, 327, 898, 145, 443, 963, 725, 854, 31, 977, 105, 669, 234, 196, 502, 780, 333, 397, 649, 116, 698, 698, 59, 194, 844, 823, 763, 98, 11, 812, 197, 842, 353, 206, 600, 585, 587, 663, 171, 789, 529, 600, 38, 389, 965, 657]