As mentioned in the question:

3 boys ate one-third of the sweets.

Now let us consider the initial number of sweets to be

(3 * 3 * 3)x = 27x

The sweets taken by Rajan = $frac{1}{3}$ * 27x = 9x

Now the number of sweets left are 18x

The sweets taken by Sajal = $frac{1}{3}$ * 18x = 6x

Now the number of sweets left are 12x

The sweets taken by Karan = $frac{1}{3}$ * 12x = 4x

Now the number of sweets left are 8x

= 8x = 16 or x = 2

Therefore, the total number of sweets in the bowl is

= 27x = (27 * 2) = 54

Explore more such questions and answers at BYJU’S.