public void Problem009_Trapping_Rain_Water_Test_1() { int act = Problem009.TrappingRainWater(new int[] { 0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1 }); int excepted = 6; Assert.Equal(act, excepted); }
public void Problem009_Trapping_Rain_Water_Test_3() { int act = Problem009.TrappingRainWater(new int[] { }); int excepted = 0; Assert.Equal(act, excepted); }
public void Problem009_Trapping_Rain_Water_Test_2() { int act = Problem009.TrappingRainWater(new int[] { 4, 2, 0, 3, 2, 5 }); int excepted = 9; Assert.Equal(act, excepted); }
static void Main(string[] args) { Console.WriteLine("Project Euler."); // var p = new Problem001(); // p.Run(); // var p2 = new Problem002(); // p2.Run(); // Problem003.Run(); // Problem004.Run(); // Problem005.Run(); // Problem005.Run_2(); // Problem006.Run(); // solved // Problem007.Run(); // solved // Problem008.Run(); Problem009.Run(); }
public void Problem009_Test_1() { int x = 121; bool act = Problem009.IsPalindrome(x); bool exp = true; Assert.Equal(exp, act); }
public void Problem009_Test_3() { int x = 10; bool act = Problem009.IsPalindrome(x); bool exp = false; Assert.Equal(exp, act); }
public void Problem009() { var problem = new Problem009() { ConsoleOutput = false, DetailedOutput = false }; Assert.AreEqual(31875000L, problem.Answer()); }
public void IsCorrectProblem009() { var problem = new Problem009(); Assert.Equal(Answers["9"], problem.Solve()); }