Saturday, April 27, 2013

project euler problem 147

Rectangles in cross-hatched grids

I cannot believe that there is a closed form for this problem. I need to spent some time to see how this is derived. I just noticed a few things to count the the rectangles in different orientations.  It only takes 40 ms, not too bad.

No comments:

Post a Comment