We have 2 types of tiles:
- type A tile has width of 70 cm and the space between this type of tiles is 5 cm,
- type B tile has width of 160 cm and the space between this type of tiles is 3 cm.
We put this tiles in a line like this (please note that there is "ending" space in the line):
- type A:
- [space = 5 cm][tile = 70 cm][space = 5 cm][tile = 70 cm] … [space = 5 cm][tile = 70 cm][space = 5 cm]
- type B:
- [space = 3 cm][tile = 160 cm][space = 3 cm][tile = 160 cm] … [space = 3 cm][tile = 160 cm][space = 3 cm]
What is the minimal width of the line that is able to be filled by both tiles of type A and tiles of type B?
I am able to solve this in the case where is no ending space in the line by looking for the least common multiple of blocks created from sum of space and tile (type A: 5 + 70, type B: 3 + 160. For the . But when I assume the ending space, it is more complicated.