Answer :
amount is directly proportional to weight
thus
A = kw A = amount
k = constant ^ which is price per gram
w = weight
thus
A = kw A = amount
k = constant ^ which is price per gram
w = weight