We often encounter a type of problem where items are distributed among several people, with each person receiving an integer number of items. In some problems, however, there are situations where someone receives a fractional number of items, and the item itself is indivisible, which can be confusing. In fact, when solving this kind of problem, if we can change our way of thinking and try reverse thinking, we often find surprising results.
### Mooncake Distribution
The Mid-Autumn Festival has arrived, and the class bought a box of mooncakes to distribute among the students. The first student took 1 mooncake and 1/9 of the remaining mooncakes; the second student took 2 mooncakes and 1/9 of the remaining mooncakes; the third student took 3 mooncakes and 1/9 of the remaining mooncakes; the fourth student took 4 mooncakes and 1/9 of the remaining mooncakes, and so on. All the mooncakes were distributed without any leftovers.
**Question**: How many students are in the class, and how many mooncakes were there in total?
---
### Analysis and Solution
This problem requires reverse thinking.
The last student took as many mooncakes as the total number of students in the class. The student before the last one took (the total number of students - 1) mooncakes plus 1/9 of the remaining mooncakes. From this, we can infer that the last student received 8/9 of the remaining mooncakes. Therefore, at the time the last student took the mooncakes, the remaining mooncakes must have been a multiple of 8.
Assume the last student took 8 mooncakes. Then, there are 8 students in total in the class. The seventh student took 7 mooncakes plus 1/9 of the remaining 9 mooncakes, for a total of 8 mooncakes. Together, the seventh and eighth students took 16 mooncakes, which should be 8/9 of the remaining mooncakes after the sixth student took 6 mooncakes. Thus, the number of remaining mooncakes after the sixth student took 6 mooncakes is 16 / (8/9) = 18. The sixth student took 6 + 18/9 = 8 mooncakes.
The eighth student took 8 mooncakes, leaving 8/9 of the remaining mooncakes after the fifth student took 5 mooncakes. This equals 8 + 8 + 8 = 24 mooncakes. Therefore, the number of remaining mooncakes after the fifth student took 5 mooncakes is 24 / (8/9) = 27. The fifth student took 5 + 27/9 = 8 mooncakes.
The eighth student took 8 mooncakes, leaving 8/9 of the remaining mooncakes after the fourth student took 4 mooncakes. This equals 8 + 8 + 8 + 8 = 32 mooncakes. Therefore, the number of remaining mooncakes after the fourth student took 4 mooncakes is 32 / (8/9) = 36. The fourth student took 4 + 36/9 = 8 mooncakes.
The eighth student took 8 mooncakes, leaving 8/9 of the remaining mooncakes after the third student took 3 mooncakes. This equals 8 + 8 + 8 + 8 + 8 = 40 mooncakes. Therefore, the number of remaining mooncakes after the third student took 3 mooncakes is 40 / (8/9) = 45. The third student took 3 + 45/9 = 8 mooncakes.
---
### Conclusion
Through reverse reasoning, we determined that the total number of students is **8**, and the total number of mooncakes is:
$$
8 \times 8 = 64
$$
Thus, the class has **8 students**, and there were **64 mooncakes** in total.