Let's carefully analyze the problem:
- There are 30 pupils.
- Each pupil bought 5 pies.
- After buying the pies, the canteen has 10 times fewer pies left than the total pies the pupils bought.
Let’s define variables:
- \( P \) = total pies originally in the canteen.
Step-by-step solution:
Calculate the total pies bought by pupils: \[ \text{Total pies bought} = 30 \times 5 = 150 \]
Determine pies left: The cans are left with 10 times fewer pies than those bought, meaning: \[ \text{Pies left} = \frac{1}{10} \times 150 = 15 \]
Total pies initially in the canteen: \[ P = \text{pies bought} + \text{pies left} = 150 + 15 = 165 \]
Final answer:
\[ \boxed{165} \]
There were 165 pies in the school canteen initially.