public void Test1() { /* * Work out the first ten digits of the sum of the following tree3digitnumbers */ string tree3digitnumbers = @"250 538 629"; string[] stringarray = tree3digitnumbers.Split(new char[] { ' ', '\n', '\r' }).Where(e => e.Length > 0).ToArray(); var sut = new E013Largesum(); string expected = "1417"; var value = sut.GetSum(stringarray); Assert.Equal(expected, value); }
public void Solution() { /* * Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. */ string[] stringarray = onehundred50digitnumbers.Split(new char[] { ' ', '\n', '\r' }).Where(e => e.Length > 0).ToArray(); var sut = new E013Largesum(); string expected = "5537376230"; var value = sut.GetSum(stringarray); Assert.Equal(expected, value); /* * Congratulations, the answer you gave to problem 13 is correct. * You are the 199875th person to have solved this problem. */ }