Пример #1
0
    public void Y2021_Day14_Expand_Returns_Correct_Value(int steps, long expected)
    {
        // Arrange
        string[] instructions =
        {
            "NNCB",
            string.Empty,
            "CH -> B",
            "HH -> N",
            "CB -> H",
            "NH -> C",
            "HB -> C",
            "HC -> B",
            "HN -> C",
            "NN -> C",
            "BH -> H",
            "NC -> B",
            "NB -> B",
            "BN -> B",
            "BB -> N",
            "BC -> B",
            "CC -> N",
            "CN -> C",
        };

        // Act
        long actual = Day14.Expand(instructions, steps);

        // Assert
        actual.ShouldBe(expected);
    }