Art of Problem Solving

2017 UNCO Math Contest II Problems/Problem 6