Ad
  • Custom User Avatar
  • Custom User Avatar

    Read the How it worked part of the kata's description, you can't change horses or hand over the mail bag in the middle of nowhere, only at stations.

    Distance          Rider number
    19 + 67 = 86      1
    34 + 20 + 41 = 95 2
    85                3
    47                4
    65 + 28 = 93      5
    54                6
    69                7
    56 + 6            8
    71                9
    60                10
    88                11
    15 + 24           12
    77                13
    64                14
    94                15
    98                16
    65 + 1            17
    42 + 28 + 23 = 93 18
    81                19
    67                20
    35 + 16 = 51      21
    85 + 2 = 87       22
    50 + 4 + 43 = 97  23
    

    And that's how each rider doesn't ride more than 100 miles each in that case.

  • Custom User Avatar

    In music theory, this is called an inverse interval.

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar
    1. First array: 5 + 5 = 10

      numbers = { 799, 379, 744, 394, 158, 523, 320, 270, 763, 990, 966, 793, 823, 198, 80,
      608, 956, 69, 132, 961, 293, 652, 444, 158, 824, 402, 640, 963, 54, 597, 468, 572,
      695, 212, 965, 852, 453, **5**, 840, 934, 713, 525, 446, 536, 722, 525, 862, 397, 593, 
      993, 77, 604, 645, 520, 481, 188, 640, 839, 152, 413, 436, 619, 984, 131, 549, 668,
      701, 721, 391, 541, 655, 104, 66, 102, 359, 506, 345, 221, 621, 657, 215, 417, 979,
      578, 936, 460, 766, 296, 299, 636, 708, 454, 973, 692, 584, 241, 79, **5**}
      
    2. Second array: 10 + 10 = 20

      numbers = {592, 979, 74, 623, 464, 428, 757, 50, 771, 597, 951, 294, 586, 289, 440,
      685, 111, 205, 175, 193, 768, 577, 621, 302, 429, 455, 271, 59, 563, **10**, 295, 873,
      989, 88, 496, 453, 234, 971, 221, 723, 568, 173, 736, 154, 180, 176, 557, **10**, 100,
      732, 920, 586, 28, 541, 887, 176, 996, 158, 234, 559, 168, 247, 432, 875, 334, 646,
      47, 568, 617, 268, 10, 903, 159, 745, 58, 57, 921, 614, 66, 739, 346, 985, 325, 374, 527}