public void Problem13_ShouldReturn_5537376230() { Assert.Throws <NotImplementedException>(() => { Problem13.GetResult(); }); }
public void Problem13_Return_Result_5537376230() { string path = BasePath + @"13\numbers.txt"; double act = Problem13.LargeSum(path); Assert.True(act.Equals(5537376230)); }
public void Test13() { var p = new Problem13(); var result = p.Solution1(); var tenDigits = new String(result.Take(10).ToArray()); Assert.Equal("5537376230", tenDigits); }
public void Test_GetFirst10DigitsOfSum() { var testTextArray = TESTTEXT.Split("\n"); var bigIntArray = testTextArray.Select(x => BigInteger.Parse(x)).ToList(); var first10Digits = new Problem13().GetFirst10DigitsOfSum(bigIntArray); Assert.AreEqual(5537376230, first10Digits); }
public void TestPartTwo() { Assert.AreEqual(1068781, Problem13.FindPartTwo(_testInput[1])); Assert.AreEqual(3417, Problem13.FindPartTwo("17,x,13,19")); Assert.AreEqual(754018, Problem13.FindPartTwo("67,7,59,61")); Assert.AreEqual(779210, Problem13.FindPartTwo("67,x,7,59,61")); Assert.AreEqual(1261476, Problem13.FindPartTwo("67,7,x,59,61")); Assert.AreEqual(1202161486, Problem13.FindPartTwo("1789,37,47,1889")); }
public void Test13(int n) { string expected = (n % 9 == 0 || n % 11 == 0 || n % 13 == 0).ToString(); using (var sw = new StringWriter()) { using (var sr = new StringReader($"{n}")) { Console.SetIn(sr); Console.SetOut(sw); Problem13.Main(); } string result = sw.ToString().Trim(); Assert.AreEqual(expected, result); } }
public void TestPartOne() { Assert.AreEqual(295, Problem13.FindPartOne(_testInput)); }
public static void Solution_SolutionForProblem13_ReturnsFullSum() { var result = Problem13.Solution(); Assert.AreEqual(BigInteger.Parse("5537376230390876637302048746832985971773659831892672"), result); }
static void Main(string[] args) { var solution = Problem13.Solve().ToString(); Console.WriteLine(solution); }
public void Problem13_ShouldReturn_5537376230() { Assert.Equal(Problem13.GetResult(), 5537376230.ToString()); }