A rectangular floor is composed of square tiles of the same size, 81 along one side, 63 along the other.
If a straight line is drawn diagonally across the floor from corner to corner how many tiles will it cross?
The GCD of 81 and 63 is 9.
There's the initial tile that's crossed: 1
There is another 81-1 for that many times a new row is entered: 81-1
There is another 63-1 for that many times a new column is entered: 63-1
But GCD-1 times, both separations (row and column)
are crossed at the same time. 9-1 (subtract)
The calculations:
>> 1+(81-1)+(63-1)-(9-1)
ans =
135
|
Posted by Charlie
on 2024-08-01 09:26:45 |