Xavier had four containers, A, B, C and D, containing a total of 270 sweets. He moved 10 sweets from A to B, 20 sweets from B to C and 30 sweets from C to D. The ratio of the number of sweets in A to the number of sweets in B to the number of sweets in C changed from 3: 7: 10 to 1:5: 8. How many sweets were in container D at first?

AAAaannndd the bot gets it wrong yet again!

the given answer cannot be right, since that would leave only 60 sweets to share among a,b,c in the ratio 3:7:10.
That would mean a started out with only 9 sweets.

210 sweets