Solution

163117

First name
Mahdi Raza
School
Mahatma Gandhi International School
Country
Age
0

PFA.

Mostly a brute force approach that just suffices. Mine is on the borderline of an elegant proof. But, I would love to see the approach of other students.

But regardless, a very interesting problem, no doubt about that!