public void ShouldReturnCorrectChecksum() { var input = @"5 1 9 5 7 5 3 2 4 6 8" ; var sut = new CorruptionChecksumCalculator(); var output = sut.Calculate(input); Assert.Equal(18, output); }
static void Main(string[] args) { var inverseCaptcha = new InverseCaptcha(); var day1resultA = inverseCaptcha.Solve1(new StringReader(Day1Input)); Console.WriteLine($"Day 1A result: {day1resultA}"); var day1resultB = inverseCaptcha.Solve2(Day1Input); Console.WriteLine($"Day 1B result: {day1resultB}"); var corruptionChecksumCalculator = new CorruptionChecksumCalculator(); var day2Aresult = corruptionChecksumCalculator.Calculate(Day2Input); Console.WriteLine($"Day 2 result: {day2Aresult}"); var day2Bresult = corruptionChecksumCalculator.GetSumOfEvenlyDivisibleValues(Day2Input); Console.WriteLine($"Day 2 result: {day2Bresult}"); }