Solution to the Lockers math problem