Input consists of a single integer n. output consists of 3 integers. the 1st, 2nd and 3rd integers corresponds to the length, breadth and area of the largest possible rectangle respectively.
Answers
Answered by
0
RectangleArea Problem Code: RGPVR103
All submissions for this problem are available.
There are several sticks each 1 inch long. Your job is to form a rectangle with the biggest possible area, using these sticks as the perimeter. You are allowed to glue sticks together, but you are not allowed to break a single stick into multiple shorter sticks. For example, if there are 11 sticks, you can create a 2 x 3 rectangle using 10 sticks. This rectangle has an area of 6 square inches, which is the biggest area that can be achieved in this case.
All submissions for this problem are available.
There are several sticks each 1 inch long. Your job is to form a rectangle with the biggest possible area, using these sticks as the perimeter. You are allowed to glue sticks together, but you are not allowed to break a single stick into multiple shorter sticks. For example, if there are 11 sticks, you can create a 2 x 3 rectangle using 10 sticks. This rectangle has an area of 6 square inches, which is the biggest area that can be achieved in this case.
Similar questions
Biology,
7 months ago
Biology,
7 months ago
Physics,
7 months ago
Computer Science,
1 year ago
Business Studies,
1 year ago
Science,
1 year ago