Cod sursa(job #886740)
Utilizator | Data | 23 februarie 2013 10:48:40 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include <fstream>
#include <cmath>
using namespace std;
double n,pw,p,i,x;
int A;
ifstream fi ("fact.in");
ofstream fo ("fact.out");
int main ()
{
fi>>p;
pw==pow(10,p);i==1;A=0;
for (n=1;n++;A=0)
{
i==i*n;
x==i/pw;
if (int(x)==x)
A=1;
}
fo<<n;
return 0;
}