Analysis because B and C bought the same weight, and both were twice as heavy as D.
So the weight bought by three people is five times that of Ding;
The total weight of seven bags of rice is12+15+17+20+22+24+26 =136 kg.
136 kg minus a multiple of 5, the rest is the weight bought by A..
Conversely, if you subtract the weight of the bag of rice bought by A from 136 kg, the remaining weight must be a multiple of 5. In order for the sum of 136 to be divisible by 5, the unit number of this number must be 1 or 6, and only 26 out of 7 bags of rice are 6;
So, the weight of the bag of rice bought by A is 26 kilograms.