Probability of rotation. 6 random numbers are chosen in between 1 to 999 and then 3 are chosen from that 6 to be the sides of a brick and the remaining three be the sides of a box, what is the probability of the brick fully rotates inside the box?
 A: Given a 6-tuple $(a,b,c,A,B,C)$, where $a,b,c$ are the side lengths of the brick and $A,B,C$ are the side lengths of the box, the brick can freely rotate inside the box if and only if $A, B, C$ are all not less than the main diagonal $D := \sqrt{a^2+b^2+c^2}$ of the brick.
To answer the variation of the question I mentioned as a comment: Suppose $a,b,c,A,B,C$ are all independent and uniformly random in $[0,1000]$. To simplify, let's say the numbers are all uniform in $[0,1]$ instead. The probability will not change due to this (imagine that we just change our unit of length from millimetres to  metres).
Now the desired probability $P$ is equal to the volume of the set $$S: = \{(a,b,c,A,B,C) \in [0,1]^6 : \sqrt{a^2+b^2+c^2} < \min(A,B,C)\}$$
divided by the volume of $[0,1]^6$ (which is $1$). To find that volume, we simply integrate $1$ over $S$. For that, let $V = \{(a,b,c )\in [0,1]^3 : a^2+b^2+c^2 < 1\}$, $A := \{(a,b,c) \in [0,1]^3 : a^2+b^2+c^2=1\}$ and $C_r := [r,1]^3$.
Now
$$P = \int_S 1 \,\mathrm{d}(a,b,c,A,B,C) = \iiint_V\iiint_{C_D}1\,\mathrm{d}(A,B,C)\,\mathrm{d}(a,b,c) = \iiint_V(1-D)^3\,\mathrm{d}(a,b,c)$$
Using the shell method, we can rewrite this as
$$P = \iint_A\int_{[0,1]} D^2(1-D)^3\,\mathrm{d}D\,\mathrm{d}s = \frac{\pi}{2}\int_{[0,1]} D^2(1-D)^3\,\mathrm{d}D = \frac{\pi}{2} \cdot \frac{1}{60} = \frac{\pi}{120}.$$
