View Code of Problem 610

#include<stdio.h>
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		long long int a=1,b=1,c=1;
		int i,j,k;
		for(i=1;i<=n;i++)
		{
			a*=i;
		}
		for(j=1;j<=2*n;j++)
		{
			b*=j;
		}
		for(k=1;k<=n+1;k++)
		{
			c*=k;
		}
		printf("%lld\n",b/(a*c));
	}
}

Double click to view unformatted code.


Back to problem 610