Manasa and Factorials
Difficulty: Hard




Manasa was sulking her way through a boring class when suddenly her teacher singled her out and asked her a question. He gave her a number **n** and Manasa has to come up with the smallest number **m** which contains atleast **n** number of zeros at the end of **m!**. Help Manasa come out of the sticky situation. 

**Input Format**  
The first line contains an integer _T_ i.e. the number of Test cases.  
Next T lines will contain an integer n.  

**Output Format**  
Print smallest such number m. 

**Constraints**  
1 &le; _T_ &le; 100 <br>
1 &le; _n_ &le; 10<sup>16</sup>  

**Sample Input**  

	3
	1
	2
	3

    
**Sample Output**  

	5
    10
    15


**Explanation**

1. As 4! = 24 and 5! = 120, so minimum value of m will be 5.
2. As 9! = 362880 and 10! = 3628800, so minimum value of m will be 10.
3. As 14! = 87178291200 and 15! = 1307674368000, so minimum value of m will be 15.

Input Format:

Output Format:

Sample Input:

Sample Output:

Python 3 starter code:
#
# Complete the 'solve' function below.
#
# The function is expected to return a LONG_INTEGER.
# The function accepts LONG_INTEGER n as parameter.
#

def solve(n):
    # Write your code here




Reference solution (C++):
###C++  
```cpp  
// Author Amit Pandey
#include<bits/stdc++.h>

using namespace std;

bool check(long long int p, long long int n)
{
    long long int temp = p , outp =0, five = 5;
    while(five < temp)
    {
        outp += temp/five;
        five = five*5;
    //    cout<<temp<<" "<<five<<endl;
    }
    if(outp>= n)
            return true;
    else
            return false;
}

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long long int n;
        cin>>n;
        if(n==1)
        {
            cout<<"5"<<endl;
            continue;
        }
        long long int low =2;
        long long int high = 100*n;
        while(low <high)
        {
            long long int mid = (low+high)/2;
            if(check(mid,n) == true)
                    high = mid;
            else
                    low = mid+1;
        }
        cout<<low<<endl;
    }
    return 0;
}
```