Solve Candy Splitting