Magic Number
Submissions: 3887   Accuracy:

42.41%

  Difficulty: Easy   Marks: 2

A magic number is defined as a number which can be expressed as a power of 5 or sum of unique powers of 5. First few magic numbers are 5, 25, 30(5 + 25), 125, 130(125 + 5), ….

Given the value of n. find the nth Magic number.

Input:

The first line contains an integer T, depicting total number of test cases. 
Then following T lines contains an integer N depicting the value of N.

P.S : As the number can be very large print the number modulo 10^9+7.


Output:

Print the nth magic number in a separate line.

Constraints:

1 ≤ T ≤ 30
1 ≤ N ≤ 10^5

Example:

Input:
2
1
2
Output:

25

** For More Input/Output Examples Use 'Expected Output' option **

Author: shef5


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.