Cod sursa(job #1590135)
| Utilizator | Data | 4 februarie 2016 19:01:40 | |
|---|---|---|---|
| Problema | Factorial | Scor | 5 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.24 kb |
#include<bits/stdc++.h>
#include<fstream>
typedef unsigned long long ull;
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
int main(){
int n,p=1,i;
fin>>n;
for(i=1;i<=n;i++)
p=p*i;
fout<<p;
return 0;
}
