Maximum Product Cutting
Submissions: 4609   Accuracy:

20.96%

  Difficulty: Easy   Marks: 2

Given a rope of length n meters, cut the rope in different parts of integer lengths in a way that maximizes product of lengths of all parts. You must make at least one cut. Assume that the length of rope is more than 2 meters.

Input:

The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The first line of each test case contains the integer N denoting the length of the rope. 


Output:

Print the maximum product obtainable for each test case in a new line. SInce the answer can be quiet large print the answer modulo 109+7.


Constraints:

1<= T <=100

2<= N <= 10000


Example:

Input:

1

2

Output:

1

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

Contributor: Sujnesh Mishra
Author: sujnesh


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.