I got this question from a last year’s olympiad paper.
Is there an approach to this by using pen-and-paper?
EDIT Working through on paper made me figure out the answer. Posted below.
I’d now like to see other methods. Thank you.
My observation suggests that we may simplify it somewhat like this assuming x=111,111:
So this means: