static void Main(string[] args) { //Console.WriteLine("Hello World!"); Display(nameof(Solutions.Solution1), Solutions.Solution1(1000)); Display(nameof(Solutions.Solution2), Solutions.Solution2(4000000)); Console.ReadLine(); }
private static void Main() { var sw = new Stopwatch(); sw.Start(); Console.WriteLine(Solutions.Problem504()); sw.Stop(); Console.WriteLine("Elapsed time: {0} ms", sw.ElapsedMilliseconds); Console.ReadLine(); }
/// <summary> /// Entry point for the project. /// </summary> public static void Main() { Console.WriteLine("Which problem would you like to check?"); string rl = Console.ReadLine(); if (rl == "t") { Test(); } else { int problem = int.Parse(rl); Type type = typeof(Solutions); MethodInfo method = type.GetMethod($"Problem{problem}"); Solutions c = new Solutions(); var result = method.Invoke(c, null); Console.WriteLine($"\nProblem {problem}: {JsonConvert.SerializeObject(result)}\n\n"); } }
public void Setup() { solution = new ProjectEuler.Solutions(); }
public void Problem65Test() { Assert.AreEqual(272, Solutions.Problem65()); }
public void Problem63Test() { Assert.AreEqual(49, Solutions.Problem63()); }
public void Problem59Test() { Assert.AreEqual(107359, Solutions.Problem59()); }
public void Problem52Test() { Assert.AreEqual(142857, Solutions.Problem52()); }
public void Proble112Test() { Assert.AreEqual(1587000, Solutions.Problem112()); }
public void Proble102Test() { Assert.AreEqual(228, Solutions.Problem102()); }
public void Problem81Test() { Assert.AreEqual(427337, Solutions.Problem81()); }
public void Problem80Test() { Assert.AreEqual(40886, Solutions.Problem80()); }
public void Problem79Test() { Assert.AreEqual("73162890", Solutions.Problem79()); }
public void Problem78Test() { Assert.AreEqual(55374, Solutions.Problem78()); }
public void Problem77Test() { Assert.AreEqual(71, Solutions.Problem77()); }
public void Problem75Test() { Assert.AreEqual(161667, Solutions.Problem75()); }
public void Proble100Test() { Assert.AreEqual(756872327473, Solutions.Problem100()); }
public void Problem82Test() { Assert.AreEqual(260324, Solutions.Problem82()); }
public void Proble104Test() { Assert.AreEqual(329468, Solutions.Problem104()); }
public void Problem83Test() { Assert.AreEqual(425185, Solutions.Problem83()); }
public void Proble205Test() { Assert.AreEqual(0.5731441m, Solutions.Problem205()); }
public void Problem87Test() { Assert.AreEqual(1097343, Solutions.Problem87()); }
public void Problem53Test() { Assert.AreEqual(4075, Solutions.Problem53()); }
public void Problem89Test() { Assert.AreEqual(743, Solutions.Problem89()); }
public void Problem62Test() { Assert.AreEqual(127035954683, Solutions.Problem62()); }
public void Problem92Test() { Assert.AreEqual(8581146, Solutions.Problem92()); }
public void Problem64Test() { Assert.AreEqual(1322, Solutions.Problem64()); }
public void Problem96Test() { Assert.AreEqual(24702, Solutions.Problem96()); }
public static void Test() { Console.WriteLine(Solutions.Factorial(0)); Console.WriteLine(Solutions.Choose(5, 3)); }
public void Problem97Test() { Assert.AreEqual("8739992577", Solutions.Problem97()); }
public void Proble99Test() { Assert.AreEqual(709, Solutions.Problem99()); }
static void Main(string[] args) { var solutions = new Solutions(); Console.WriteLine(String.Format("Answer to Problem 12 = {0}", solutions.Problem012())); Console.ReadKey(); }