Cod sursa(job #1516515)
| Utilizator | Data | 3 noiembrie 2015 09:21:06 | |
|---|---|---|---|
| Problema | Factorial | Scor | 5 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.29 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
int p,n,t;
ifstream f("fact.in");
ofstream g("fact.out");
f>>p;
n=0;
t=-1;
while(t!=p)
{
if(n%5==0) t+=1;
if(t==p) break;
else n+=1;
}
g<<n;
}
