Cod sursa(job #552111)
Utilizator | Data | 11 martie 2011 17:36:42 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.24 kb |
#include<fstream.h>
int main()
{
int p,i,k=0;
long long x=1;
ifstream f("fact.in");
ofstream g("fact.out");
f>>p;
while (k<p)
{
if (x%5==0) {k++; if (k==p) break;}
x++;
}
g<<x;
f.close();
g.close();
return 0;
}