Problem 85
Counting rectangles

By counting carefully it can be seen that a rectangular grid measuring 3 by 2 contains eighteen rectangles:

Although there exists no rectangular grid that contains exactly two million rectangles, find the area of the grid with the nearest solution.

These problems are part of Project Euler and are licensed under CC BY-NC-SA 2.0 UK

http://projecteuler.net/problem=85