P14540 [HackerRank] Manasa and factorials
提高-
题目描述

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 ≤ T ≤ 100

1 ≤ n ≤ 10^{16}

Sample Input

3
1
2
3

Sample Output

5
10
15

Explanation

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

输入格式

见题面

输出格式

见题面

样例输入
3 1 2 3
样例输出
5 10 15