Pagini recente » Cod sursa (job #479823) | Cod sursa (job #1563486) | Cod sursa (job #2937330) | Cod sursa (job #449763) | Cod sursa (job #656605)
Cod sursa(job #656605)
#include<iostream>
#include<fstream>
using namespace std;
std::ifstream f("adunare.in");
std::ofstream g("adunare.out");
int main(void){
long int x=1,i=2,p,j;
f>>p;
if(p==0)
g<<1;
else
{
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;
}