Cod sursa(job #2225558)
Utilizator | Data | 27 iulie 2018 15:30:15 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f ("fact.in");
ofstream g ("fact.out");
int main()
{
long long p, n=1;
f >> p;
while(p)
{
if(p == n / 5 + n / 25)
p = 0;
else
n++;
}
g << n;
return 0;
}