public static void Part1(string[] input) { Helper.PrintChallengePart("Part 1"); XmasSystem xmas = new XmasSystem(input); long result = xmas.FindInvalidData(25); Console.WriteLine("Invalid: " + result); }
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); }
public void Day9Part1() { // Arrange string[] input = Helper.ParseInput(@"Inputs\\Day9_example.txt"); //Act XmasSystem xmas = new XmasSystem(input); long result = xmas.FindInvalidData(5); //Assert Assert.AreEqual(127, result); }
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); }