Рет қаралды 13,112
Given an m x n rectangle drawn on a square grid, we calculate the number of squares that its diagonal passes through.
I found this problem on Cut-the-Knot:
www.cut-the-knot.org/Curricul...
00:00 Intro
00:25 Counting squares
03:22 Solution: 12 x 8 example
06:32 General solution