Cod sursa(job #1355449)

Utilizator Alex1199Alex Bercea Alex1199 Data 22 februarie 2015 18:36:29
Problema Factorial Scor 15
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.27 kb
#include <fstream>
using namespace std;
ifstream f("fact.in");
ofstream g("fact.out");
int64_t p, rez, i;
int64_t zero(int n)
{
    if (!(i/n)) return 0;
    else return i/n+zero(n*5);
}
int main()
{
  f>>p;
  for(i=1;zero(5)<p;i++){}
  g<<i;
    return 0;
}