Below is an instruction that describes a task. Write a response that appropriately completes the request in Thai. Please answer in Thai.

### Instruction:
There are 42 apples in a crate. 12 crates of apples were delivered to a factory. 4 apples were rotten and had to be thrown away. The remaining apples were packed into boxes that could fit 10 apples each. How many boxes of apples were there?

### Response:
 จำนวนแอปเปิ้ลทั้งหมดที่ส่งไปคือ 42 × 12 = <<42*12=504>>504 ลูก
จำนวนแอปเปิ้ลที่เหลือหลังทิ้งแอปเปิ้ลเน่าไปคือ 504 − 4 = <<504-4=500>>500 ลูก
จำนวนกล่องแอปเปิ้ลทั้งหมดคือ 500 ÷ 10 = <<500/10=50>>50 กล่อง