# Challenge Response 76

## Great-grandfather's age

Let's say the caller's grandfather was born at 18XY. According to the problem data, your age will be XY. Note that grandfather could only have been born in the previous century! Thus, your age will be given by: 1938 - 18XY = XY. Now we need to break down the numbers according to their respective orders so that we can “assemble an equation.

For example, the number 735 is broken down as follows: 7 x 100 + 3 x 10 + 5 x 1, ie 7 HUNDREDS, 3 TENS, and 5 UNITS. Returning to the equation:

938 - 800 - 10X - Y = 10 X - Y
20X + 2Y = 138 (dividing everything by 2)
10X + Y = 69 (equation 1).

The age of the grandson is given by the equation 1938 - 19ZW = ZW. Just as we did in Grandpa's case.

38 - 10Z - W = 10Z + W
20Z + 2W = 38
10 Z + W = 19 (equation 2)

The age of the grandfather when the grandson was born should be given by:

19ZW - 18XY
100 + (10Z + W) - (10X + Y) (equation 3).

From equation 1, we have that (10X + Y) = 69, and from equation 2, (10Z + W) = 19. Then substituting these values ​​in equation 3, we get the age of grandfather when his grandson was born:

100 + 19 - 69 = 50 years

Back to statement