Beispiel #1
0
        public void SolutionsShouldMatch(int length, long expectedValue)
        {
            var problem = new Problem4();

            var result = problem.Solve(new SingleLimitProblemArgs(length));

            Assert.AreEqual(expectedValue.ToString(), result);
        }
Beispiel #2
0
        public void SolveTest()
        {
            Problem4 problem4 = new Problem4();

            double expected = 9009;
            double actual   = problem4.Solve(2);

            Assert.AreEqual(expected, actual);
        }
Beispiel #3
0
 static void Main(string[] args)
 {
     Console.ForegroundColor = ConsoleColor.DarkGreen;
     Console.WriteLine("Project Euler");
     Problem1.Solve();
     Problem2.Solve();
     Problem3.Solve();
     Problem4.Solve();
     Console.ReadLine();
 }
Beispiel #4
0
        static void Main(string[] args)
        {
            if (args.Length != 2)
            {
                return;
            }
            var p = new Problem4();

            p.Solve(args[0], args[1]);
        }
 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()}");
 }