View Code of Problem 610

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main() {
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		int i,j,a=1,b=1;
		for(i=2*n;i>n;i--)
		{
			a=a*i;
		}
		for(j=1;j<=n;j++)
		{
			b=b*j;
		}
		int num=(a/b)/(n+1);
		printf("%d\n",num);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 610