public static int GetRequiredNumberOfMatches(int players, int rounds) { return(FastMath.Factorial(players) * rounds / (2 * FastMath.Factorial(players - 2))); }