Once you attempt the question then PrepInsta explanation will be displayed.

Let the number of male and female in the party be x and y respectively.

Then according to the question xy = 24------- (i)

Therefore, number of hugs at the party = Numbers of hugs among the males + Number of hugs among the females.

Now number of hugs among males =x(x-1)/2 And numbers of hugs among females =y(y-1)/2

Therefore, Total number of hugs =x(x-1)/2 + y(y-1)/2. ----- (ii)

From equation 1 xy =24

So the value of xy can be (1,24), (3,8)(2,12)(4,6)(6,4)(8,3)(12,2)(24,1)

By taking one of these values and putting in equation---(ii)

we get total number of hugs

=6(6-1)/2 + 4(4-1)/2 = 15+6 = 21