Cod sursa(job #674857)

Utilizator hcalinHrih Calin hcalin Data 6 februarie 2012 20:25:38
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.22 kb
#include <fstream>
using namespace std;

ifstream f("fact.in");
ofstream g("fact.out");

int p,i,x,y;
int main(){
	f>>p;i=0;
	while(y<=p){
		i=+5;
		x=i;
		while(x%5==0){
			x/=5;
			y++;
		}
	}
	g<<i;
}