RectangleAreaProblem 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.
Input
Input will begin with an integer T, the number of test cases. Then there are T lines, each containing exactly one number N ,the number of stick. -N will be between 4 and 5000
Output
For every number N, output a single line containing the maximal area (in square inches) of a rectangle
Example
Input: 3 14 10 111 Output: 12 6 756
| Author: | rgpvcodeforce |
| Date Added: | 8-04-2011 |
| Time Limit: | 1 sec |
| Source Limit: | 50000 Bytes |
| Languages: | C, CPP 4.0.0-8, CPP 4.3.2, JAVA |
Comments
SUCCESSFUL SUBMISSIONS FOR THIS PROBLEM:
HELP
Program should read from standard input and write to standard output. After you submit a solution you can see your results by clicking on the [My Submissions] tab on the problem page. Below are the possible results:
- Accepted
Your program ran successfully and gave a correct answer. If there is a score for the problem, this will be displayed in parenthesis next to the checkmark. - Time Limit Exceeded
Your program was compiled successfully, but it didn't stop before time limit. Try optimizing your approach. - Wrong Answer
Your program compiled and ran succesfully but the output did not match the expected output. - Runtime Error
Your code compiled and ran but encountered an error. The most common reasons are using too much memory or dividing by zero. For the specific error codes see the help section. - Compilation Error
Your code was unable to compile. When you see this icon, click on it for more information.
If you are still having problems, see a sample solution here.

Fetching successful submissions

Yea First one to solved
Yea First one to solved this:)
too easy
I can see