Cod sursa(job #651752)
Utilizator | Cazacu Robert taigi100 | Data | 21 decembrie 2011 14:23:34 |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.22 kb |
#include<iostream>
using namespace std;
int main()
{
int n=1,p,c=0,s;
cin>>p;
while(c<p)
{
if(n==1)
n=5;
s=n;
while(s!=1 && s!=0){
if(s%5==0)
c++;
s=s/5;
}
n+=5;
}
cout<<n;
}