So im going to start a problem:
https://wwwcgi.cdf.toronto.edu/~heap/cgi-bin/Solvent/wiki.pl?Problem_Solving_Home_Page/DiagonalCount
You have a rectangular grid made up of m rows and n columns (the symbols n and m represent positive whole numbers). Draw a line from the upper left to the lower right corner (the diagonal). How many of the grid squares will the line pass through the interior of? If you are told m and n, can you calculate how many squares the diagonal will meet the interior of? Can you derive a formula?
Here's what happens for 4 rows and 6 columns:

So...............
just by looking at it, i see the pattern of 2X3 square with that grey shaded worm(?) shaped squares.
I think important thing we hav to consider here is,
for example, when m is 3, after 2nd row, no matter how much rows u add, the number of grey squares stays same. Similarly, when n is 2.
Pretty good start i guess..?
No comments:
Post a Comment