Cod sursa(job #2331249)
Utilizator | Data | 29 ianuarie 2019 13:26:47 | |
---|---|---|---|
Problema | Dirichlet | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include <math.h>
#include <fstream>
using namespace std;
ifstream fin("dirichlet.in");
ofstream fout("dirichlet.out");
long long n, m, i, j, fact[1000100];
int main(){
fin>>n;
fact[0]=1;
for(i=1; i<=2000100; i++){
fact[i]=i*fact[i-1];
}
fout<<(fact[2*n]/fact[n])/fact[n+1];
}