public void Calculate_The_One_Millionth_Permutation_Of_0_Thru_9() { var problem = new Problem_024(); var result = problem.CalculateNthPermutation(1000000); Assert.That(result, Is.EqualTo("2783915460")); }
public static int Solve() { GeneratePolygonalNumbers(); List <string> polygonPermutations = Problem_024.GeneratePermutations("345678"); foreach (string polygonPerm in polygonPermutations) { int sum = FindSolution(polygonPerm); if (sum > 0) { return(sum); } } return(0); }