Cod sursa(job #508839)

Utilizator swxxIoo Andrei Rares swxx Data 9 decembrie 2010 19:02:01
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.26 kb
#include<fstream>
using namespace std;
int main()

{ unsigned long long n,m=1,i=1,p=1,j;
ifstream f("fact.in");
ofstream g("fact.out");
f>>n;
for(j=1;j<=n;j++)
p=p*10;

while (m%p!=0)
{
      m=m*i;
      i++;
      }
     g<<i-1;

 return 0;   
}