Number of sweets received by every students = 15% of 40 = (40 x 15)/100 = 6
∴ Number of sweets received by 40 students = 40 x 6 = 240
Number of sweets received by each teacher = 20% of 40 = (40 x 20)/100 = 8
∴ Number of sweets received by 5 teachers = 8 x 5 = 40
∴ Total number of sweets = 240 + 40 = 280