Short trick: ∵ Total is always same ∴ nX = (n – 1)Y + A ---- (1) ⇒ 30Y – 15X = 16Y – A ⇒ 15X = 14Y + A ---- (2) Comparing equation (1) and (2) ⇒ n = 15 Detailed solution: Given, 30Y – 15X = 16Y – A Subtracting 15Y from both the sides ⇒ 15Y – 15X = Y – A ⇒ (Y – A)/(Y – X) = 15 ---- (1) Average of all ‘n’ numbers = Sum of ‘n’ numbers/n nX = Sum of ‘n’ numbers Average of all numbers except A = (Sum of ‘n’ numbers – A)/(n – 1) ⇒ Y = (nX – A)/(n – 1) ⇒ n(Y – X) = Y – A ⇒ n = (Y – A)/(Y – X) = 15 [From equation 1] ∴ The set contains 15 numbers.