Max rope cutting
Submissions: 2265   Accuracy:

28.73%

  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.

Input:

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

Output:

Print the maximizes product of lengths of all parts.

Constraints:

1 ≤ T ≤ 50
1 ≤ N ≤ 100

Example:

Input:
2
2
5

Output:
1
6

 

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

Author: rajatjha


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.