コード例 #1
0
        public void Part1_GetJoltageDistributionForSimpleExample()
        {
            var input = new List <int>
            {
                16,
                10,
                15,
                5,
                1,
                11,
                7,
                19,
                6,
                12,
                4
            };

            DayTen.GetJoltageDistrubutionForAdapterChain(input).Should().Be((7, 0, 5));
        }
コード例 #2
0
        public void Part1_GetJoltageDistributionForLargerExample()
        {
            var input = new List <int>
            {
                28,
                33,
                18,
                42,
                31,
                14,
                46,
                20,
                48,
                47,
                24,
                23,
                49,
                45,
                19,
                38,
                39,
                11,
                1,
                32,
                25,
                35,
                8,
                17,
                7,
                9,
                4,
                2,
                34,
                10,
                3
            };

            DayTen.GetJoltageDistrubutionForAdapterChain(input).Should().Be((22, 0, 10));
        }