Cod sursa(job #274041)
| Utilizator | Data | 9 martie 2009 12:51:35 | |
|---|---|---|---|
| Problema | Factorial | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.24 kb |
#include <fstream>
using namespace std;
int main()
{
long long n=1,p,i;
ifstream in ("fact.in");
ofstream out("fact.out");
in>>p;
i=5;
while (n<=p)
{
n+=i/5;
i+=5;
}
return 0;
}
