public override string SecondStar() { var input = RemoveWhitespace(ReadLineInput()); var result = new SpreadSheet(input).SumEvenDivisable; return(result.ToString()); }
public override string FirstStar() { var input = RemoveWhitespace(ReadLineInput()); var result = new SpreadSheet(input).Checksum; return(result.ToString()); }
public void FirstStarExample() { var input = new[] { "5 1 9 5", "7 5 3", "2 4 6 8" }; var checksum = new SpreadSheet(input).Checksum; Assert.Equal(8 + 4 + 6, checksum); }
public void SecondStarExample() { var input = new[] { "5 9 2 8", "9 4 7 3", "3 8 6 5" }; var sumOfEvenDivisable = new SpreadSheet(input).SumEvenDivisable; Assert.Equal(8 / 2 + 9 / 3 + 6 / 3, sumOfEvenDivisable); }