示例#1
0
        public void SolutionsShouldMatch(string input, int sequenceLength, long expectedValue)
        {
            var problem = new Problem8();

            var result = problem.Solve(new Problem8.Arguments(input, sequenceLength));

            Assert.AreEqual(expectedValue.ToString(), result);
        }
示例#2
0
        public void SolveTest()
        {
            Problem8 problem8 = new Problem8();

            double expected = 5832;
            double actual   = problem8.Solve(4);

            Assert.AreEqual(expected, actual);
        }
示例#3
0
 static void Main(string[] args)
 {
     Console.WriteLine($"Problem 1: {Problem1.Solve()}");
     Console.WriteLine($"Problem 2: {Problem2.Solve()}");
     Console.WriteLine($"Problem 3: {Problem3.Solve()}");
     Console.WriteLine($"Problem 4: {Problem4.Solve()}");
     Console.WriteLine($"Problem 5: {Problem5.Solve()}");
     Console.WriteLine($"Problem 6: {Problem6.Solve()}");
     Console.WriteLine($"Problem 7: {Problem7.Solve()}");
     Console.WriteLine($"Problem 8: {Problem8.Solve()}");
     Console.WriteLine($"Problem 9: {Problem9.Solve()}");
     Console.WriteLine($"Problem 10: {Problem10.Solve()}");
 }
示例#4
0
 public void Verify_Highest_Product_For_N_Adjacent_Number()
 {
     Assert.AreEqual(5832, Problem8.Solve(4));
     Assert.AreEqual(23514624000, Problem8.Solve(13));
 }