Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- class Exercise10Catalan
- {
- static BigInteger Factorial(int factor)
- {
- if (factor > 1)
- {
- return factor * Factorial(--factor);
- }
- return 1;
- }
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- Console.WriteLine(Factorial(2*n) / (Factorial(n+1) * Factorial(n)));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement