DWITE Online Computer Programming Contest
December 2010
Problem 2
Unit rectangles
Rectangles can be constructed out of smaller squares. Given a supply of unit squares (1x1 in size), how many unique rectangles can be constructed?
The input file DATA2.txt will contain 5 lines, each an integer 1 <= N <= 1000, a number of unit squares available.
The output file OUT2.txt will contain 5 lines, each a number of unique rectangles that can be constructed from
Note: a rectangle is unique if another rectangle that had previously been constructed can't be rotated to look the same way. That is, 2x3 and 3x2 are considered to be the same.
Sample Input (first 2 shown):
2 6
Sample Output (first 2 shown):
2 8