Cod sursa(job #1004287)
Utilizator | Bagu Alexandru impulse | Data | 2 octombrie 2013 15:09:42 |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
//
// main.cpp
// ex2
//
// Created by Alexandru Bagu on 02.10.2013.
// Copyright (c) 2013 Alexandru Bagu. All rights reserved.
//
#include <iostream>
using namespace std;
typedef long long int ulint;
int main(int argc, const char * argv[])
{
int k;
cin>>k;
ulint n = 0;
ulint m = 0;
ulint aux = 0;
while(m < k)
{
n++;
aux = n;
while(aux % 5 == 0)
aux/=5, m++;
}
cout<<n<<endl;
return 0;
}