Cod sursa(job #638068)
Utilizator | Data | 20 noiembrie 2011 18:36:55 | |
---|---|---|---|
Problema | Dirichlet | Scor | 8 |
Compilator | cpp | Status | done |
Runda | .com 2011 | Marime | 0.3 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*=i%MOD;
for(j=3;j<=n-1;j++)
pos2*=j%MOD;
out<<(pos1/(pos2)%MOD)%MOD;
}