public void SolvePuzzle() { string input = GetPuzzleInput(); Assert.Equal(58975, CorruptionChecksum.getMinMaxAggregate(input)); Assert.Equal(308, CorruptionChecksum.getDivisionAggregate(input)); }
public void Example_Part2() { var input = "5\t9\t2\t8\r\n" + "9\t4\t7\t3\r\n" + "3\t8\t6\t5"; CorruptionChecksum.CalculateCheckSum_Part2(input).Should().Be(9); }
public void Example() { var input = "5 1 9 5\r\n" + "7 5 3\r\n" + "2 4 6 8"; CorruptionChecksum.CalculateCheckSum(input).Should().Be(18); }
public void PartTwo() { string input = @" 5 9 2 8 9 4 7 3 3 8 6 5 "; Assert.Equal(9, CorruptionChecksum.getDivisionAggregate(input)); }
public void PartOne() { string input = @" 5 1 9 5 7 5 3 2 4 6 8 "; Assert.Equal(18, CorruptionChecksum.getMinMaxAggregate(input)); }
static void Main(string[] args) { Console.WriteLine($"Day1 Answer: {InverseCaptcha.CalcSum()}"); Console.WriteLine($"Day1 Part2 Answer: {InverseCaptcha.CalcSumPart2()}"); var day2InputPuzzle = System.IO.File.ReadAllText("Day2\\InputPuzzleDay2.txt"); Console.WriteLine($"Day2 Answer: {CorruptionChecksum.CalculateCheckSum(day2InputPuzzle)}"); Console.WriteLine($"Day1 Part2 Answer: {CorruptionChecksum.CalculateCheckSum_Part2(day2InputPuzzle)}"); Console.WriteLine($"Day3 Answer: {SpiralMemory.CalculateSteps(289326)}"); if (Debugger.IsAttached) { Console.ReadKey(); } }
public void Setup() { ClassUnderTest = new CorruptionChecksum(); }