You can compute the result by checking if the item is the last one in the list, or if it's one of the initial N-1
items.
- When it is one of the initial
N-1
items, useMath.Truncate(100*Weight/Count)/100
- When it is the last item, use
Weight - ((Count-1) * Math.Truncate(100*Weight/Count) / 100)
The logic behind this is simple: when it's one of the initial numbers, truncate the result of division; compute the last number by subtracting the sum of truncated values from the total weight.
This approach produces two numbers after the decimal point, so your second example would looks like
30.33
30.33
30.34