Comment

Comment by HarHarVeryFunny

Ann is 18.

I think what makes it confusing is the "variable overloading" referring to both the current ages of Mary and Ann (M & A), and their ages at some point in the past "when Mary was as old as Ann is now" (M' & A').

So, what we're given is:

M = 24

M' = A

M = 2A' => A' = M/2 = 12

Since the age gap between Mary and Ann is constant, we know:

M - A = M'- A'

So, substituting in the known values:

24 - A = A - 12

2A = 36

A = 18

We can double check the result. Since Mary (24) is 6 years older than Ann (18), then when Mary was 18 Ann would have been 12, so Mary is now twice that age as given.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton