5. There are 100 different cards with numbers $2,5,2^{2}, 5^{2}, \ldots, 2^{50}, 5^{50}$ (each card has exactly one number, and each number appears exactly once). In how many ways can 2 cards be chosen so that the product of the numbers on the chosen cards is a cube of an integer?
Answer: 1074.

Solution. To obtain the cube of a natural number, it is necessary and sufficient for each factor to enter the prime factorization of the number in a power that is a multiple of 3.

Suppose two cards with powers of two are chosen. We have 16 exponents that are divisible by 3 $(3,6,9, \ldots, 48)$, 17 exponents that give a remainder of 1 when divided by $3(1,4,7, \ldots, 49)$, and 17 exponents that give a remainder of 2 when divided by $3(2,5,8, \ldots, 50)$. We need the sum of the exponents to be a multiple of 3. For the sum of two natural numbers to be divisible by 3, we can either choose two numbers that are divisible by $3\left(C_{16}^{2}=\frac{16 \cdot 15}{2}=120\right)$, or take one number that gives a remainder of 1 when divided by 3 and one number that gives a remainder of 2 when divided by $3(17 \cdot 17=289$ ways). We get $120+289=409$ ways.

The number of ways when the powers of five are written on both chosen cards is exactly the same, i.e., 409.

If one card with a power of two and one card with a power of five are taken, then both exponents must be divisible by 3 - we get $16 \cdot 16=256$ ways.

In total: $409+409+256=1074$ ways.