Cod sursa(job #319411)

Utilizator Nickyu0712Nichita Utiu Nickyu0712 Data 31 mai 2009 19:00:40
Problema Factorial Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include <fstream.h>

int main()
{
	long n, rasp;
	ifstream fin("fact.in");
	fin >>  n;
	fin.close();
	rasp = n/5 + n/25 + n/125 + n/625 + n/3125 + n/15625 + n/78125 + n/390625 + n/1953125 + n/9765625 + n/48828125;
	ofstream fout("fact.out");
	fout << rasp;
	fout.close();
	return 0;
}