C言語式C(n,m)=n!/((n-m)!m!)の値

301 ワード

#include
using namespace std;
const int mod=1e6+7;
const int maxn=500;
int c[maxn][maxn];
int main(){
	memset(c,0,sizeof(c));
	c[0][0]=1;
	for(int i=0;i<=maxn;i++){
		c[i][0]=c[i][i]=1;
		for(int j=1;j