39. Objects $A, B, C$ and $D$ need to be compared by weight using a two-pan balance. When $A$ and $B$ were placed on one pan and $C$ and $D$ on the other, equilibrium was established. However, when $C$ and $A$ were moved from one pan to the other, the pan with $D$ and $A$ sank. When $B$ was placed on one pan and $A$ and $C$ on the other, the pan with $A$ and $C$ rose. Compare the weights of these objects.
39. In ascending order by weight, the items are arranged as follows: $C, A, B, D$.

40, 41. We should use the Pigeonhole Principle. Let's solve, for example, problem 41. Let $n_{1}, n_{2}, n_{3}, \ldots, n_{100}$ be arbitrary integers. Consider the following 100 numbers: $n_{1}, n_{1}+n_{2}, n_{1}+n_{2}+n_{3}, \ldots, n_{1}+n_{2}+n_{3}+\ldots+n_{100}$. When each of these numbers is divided by 100, we get a certain remainder. Among these remainders, there may be a remainder of 0. Then the corresponding number is divisible by 100. But it may also happen that there is no remainder of 0. In this case, the number of different possible remainders will not exceed 99, while there are 100 remainders in total. Therefore (by the Pigeonhole Principle), at least two remainders will be equal. The difference between the numbers corresponding to these remainders (which is the sum of several given numbers) is divisible by 100.