9. (12 points) There are 50 candies in a pile, and Xiaoming and Xiaoliang are playing a game. Every time Xiaoming wins, he takes 5 candies, eats 4, and puts the remaining 1 candy in his pocket; every time Xiaoliang wins, he also takes 5 candies, eats 3, and puts the remaining 2 candies in his pocket. When the game ends, all the candies are taken, and at this point, the number of candies in Xiaoliang's pocket is exactly 3 times the number of candies in Xiaoming's pocket. How many candies did the two of them eat in total?
【Answer】Solution: If each person wins 5 candies each time, then 50 candies have been distributed $50 \div 5=10$ (times). Each time, Xiaoming has 1 candy left in his pocket, and Xiaoliang has 2 candies left in his pocket. To make the number of candies in Xiaoliang's pocket exactly 3 times that of Xiaoming's after 10 distributions, we can deduce through trial and error that if Xiaoliang wins 4 times, he will have 4 candies left in his pocket, and if Xiaoming wins 6 times, he will have 12 candies left in his pocket. Therefore, the total number of candies they have eaten is: $4 \times 4 + 3 \times 6 = 34$ (candies). Hence, the answer is 34.