3. There are 195 different cards with numbers $1, 5, 7, 5^{2}, 7^{2}, \ldots, 5^{97}, 7^{97}$ (each card has exactly one number, and each number appears exactly once). In how many ways can 3 cards be chosen so that the product of the numbers on the chosen cards is a square of an integer divisible by 35?
Answer: 223488.

Solution. Consider the case when one of the selected cards has a one written on it. Then, on the other two cards, even powers of fives and sevens must be recorded. There are 48 ways to choose an even power of five and 48 ways to choose an even power of seven, and since this choice is made independently, the total number of ways in this case is $48^{2}=2304$.

Now let's move on to the case when the card with one is not used. There are two possibilities: to take two cards with powers of five and one with a power of seven, or vice versa.

Suppose we take two cards with powers of seven. Since the product of the selected numbers must contain seven in an even power, the powers of seven on the selected cards must have the same parity. We have a total of 49 cards with odd powers and 48 cards with even powers. Thus, there are $C_{49}^{2}=\frac{49 \cdot 48}{2}=1176$ ways to choose cards with odd powers and $C_{48}^{2}=\frac{48 \cdot 47}{2}=1128$ ways to choose two cards with even powers, totaling 2304 ways. After selecting the cards with powers of seven, we can choose any card with an even power of five (48 ways). Since the choice of the card with the power of five is independent of the previous choice, in total, we get $2304 \cdot 48=110592$ ways.

It is easy to see that if we take two cards with powers of five and one with a power of seven, the number of ways will be the same as in the previous case. Therefore, we get $2304+110592 \cdot 2=223488$ ways.