On Arbor Day, Teacher Wang took the whole class to plant trees on the hillside. The number of students can be divided into three groups. It is known that they planted a total of 312 trees. Teacher Wang planted as many trees as each student, and no more than 10 trees. How many students are there in the whole class?
植树节，王老师带了全班学生去山坡植树，学生人数恰好可以等分成三组．已知他们共栽了312棵树，王老师和每个学生栽的一样多，并且不超过10棵，问全班一共有多少学生？
<result>52</result>