Pagini recente » Statistici ICHB2 Laura Cristina Serban (ichb2_laura_cristina_serban) | Cod sursa (job #1277342) | Cod sursa (job #1940003) | Cod sursa (job #324843) | Cod sursa (job #656592)
Cod sursa(job #656592)
#include<iostream>
#include<fstream>
using namespace std;
std::ifstream f("fact.in");
std::ofstream g("fact.out");
int main(void){
long int x=1,i=2,p,j;
f>>p;
bool go=true;
while(go)
{
//imultim
x=x*i;
j=0;
int x2=x;
while(x2%10 == 0)
{
j++;
x2=x2/10;
}
if(j==p)
go=false;
else
i++;
}
g<<i;
return 0;
}