Esempio n. 1
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            XmasSystem xmas   = new XmasSystem(input);
            long       result = xmas.FindInvalidData(25);
            long       sum    = xmas.FindContiguousSet(result);

            Console.WriteLine("Contiguous Sum: " + sum);
        }
Esempio n. 2
0
        public void Day9Part2()
        {
            // Arrange
            string[] input = Helper.ParseInput(@"Inputs\\Day9_example.txt");

            //Act
            XmasSystem xmas   = new XmasSystem(input);
            long       result = xmas.FindInvalidData(5);
            long       sum    = xmas.FindContiguousSet(result);

            //Assert
            Assert.AreEqual(62, sum);
        }