Pagini recente » Cod sursa (job #21080) | Cod sursa (job #1272221) | Cod sursa (job #439747) | Cod sursa (job #706600) | Cod sursa (job #1004288)
//
// main.cpp
// ex2
//
// Created by Alexandru Bagu on 02.10.2013.
// Copyright (c) 2013 Alexandru Bagu. All rights reserved.
//
#include <iostream>
#include <fstream>
using namespace std;
typedef long long int ulint;
int main(int argc, const char * argv[])
{
ifstream fin("fact.in");
int k;
fin>>k;
ulint n = 0;
ulint m = 0;
ulint aux = 0;
while(m < k)
{
n++;
aux = n;
while(aux % 5 == 0)
aux/=5, m++;
}
ofstream fout("fact.out");
fout<<n<<endl;
return 0;
}