Cod sursa(job #1502272)
Utilizator | Data | 14 octombrie 2015 15:03:46 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.4 kb |
#include<fstream>
using namespace std;
main(){
ifstream fin("fact.in");
ofstream fout("fact.out");
int n=0,p,i=1,temp;
fin>>p;
if(p==0){
fout<<i;
}
else{
do{
n=n+5;temp=n;
do{
temp=temp/5;
--p;
}while(j%5==0)
}while(p>0)
fout<<n;
}
}