We can arrange short sticks to make grid of squares, as in the 3 x 3 example of the figure below, which requires 24 sticks. How many sticks are required to make a 151 x 143 grid of squares?
A (R x C) grid of squares made from sticks has (C+1) columns of sticks and (R+1) rows of sticks.
Each row has C sticks. Each column has R sticks.
Vertical sticks (columns) = (C+1)(R) = RC+R Horizontal sticks (rows) = (R+1)(C) = RC+C
Total = 2RC + R + C
1x1 = 2 + 1 + 1 = 4
1x2 = 4 + 1 + 2 = 7
3x3 = 18 + 3 + 3 = 24
151x143 = 2(151x143)+151+143 = 43480