Project Euler 117: Count the number of ways a space 50 units long could be filled by tiles, heterogeneously, measuring 2, 3 or 4 units long.
Using a combination of black square tiles and oblong tiles chosen from: red tiles measuring two units, green tiles measuring three units, and blue tiles measuring four units, it is possible to tile a row measuring five units in length in exactly fifteen different ways.
How many ways can a row measuring fifty units in length be tiled?
NOTE: This is related to Problem 116.
As the simplest solution for the problem set requium, we make a small change to problem 116 by allowing multiple tiles of length 2, 3 and 4 to share the space.
Project Euler 117 SolutionRuns < 0.001 seconds in Python 2.7.
Use this link to get the Project Euler 117 Solution Python 2.7 source.
AnswerSlowly swipe from either end beginning with the white vertical bar to get an idea of the starting or ending digits. For less drama, just double click the answer area. The distance between the two bars will give you an idea of the magnitude. Touch devices can tap and hold the center of the box between the two bars and choose define to reveal the answer.
- See also, Project Euler 116 Solution: Count the number of ways a space 50 units long could be filled by tiles, homogeneously, measuring 2, 3 or 4 units long.