There are 5 bags numbered 1 to 5.
We don't know how many bags contain 10 gm and
11 gm coins.
We only know that the total weights of coins is 323.
Now the idea here is to get 3 in the place of total
sum's unit digit.
Mark no 1 bag as having 11 gm coins.
Mark no 2 bag as having 10 gm coins.
Mark no 3 bag as having 11 gm coins.
Mark no 4 bag as having 11 gm coins.
Mark no 5 bag as having 10 gm coins.
Note: The above marking is done after getting false
results for some different permutations, the permutations
which were giving 3 in the unit place of the total sum.
Now, we have picked 1, 2, 4, 8, 16 coins respectively
from bags 1 to 5.
Hence total sum coming from each bag from 1 to 5 is 11,
20, 44, 88, 160 gm respectively.
For the above combination we are getting 3 as unit digit
in sum.
Lets find out the total sum, it's 11 + 20 + 44 + 88 + 160 = 323.
So it's coming right.
Now 11 gm coins containing bags are 1, 3 and 4.
Hence, the product is : 1 x 3 x 4 = 12.