Cod sursa(job #638375)
Utilizator | Data | 20 noiembrie 2011 20:39:47 | |
---|---|---|---|
Problema | Dirichlet | Scor | 4 |
Compilator | cpp | Status | done |
Runda | .com 2011 | Marime | 0.31 kb |
#include<fstream>
#define MOD 9999991
using namespace std;
ifstream in("dirichlet.in");
ofstream out("dirichlet.out");
int main()
{long long n,pos1=1,pos2=1,i,j;
in>>n;
for(i=n+2;i<=2*n-1;i++)
pos1=(pos1*i)%MOD;
for(j=3;j<=n-1;j++)
pos2=(pos2*j)%MOD;
out<<(pos1/pos2)%MOD;
}