12. Following the order of King Pea, General Mushtralkin tried to arrange all the soldiers in rows first by 2, and then by $3,4,5,6,7,8,9,10$, but to his surprise, each time the last row was incomplete, as there were respectively

$$
1,2,3,4,5,6,7,8,9
$$

soldiers left. What is the smallest number of soldiers there could have been?
12. If we add 1 to the desired number, we get a number that is divisible by each of the numbers from 2 to 10 inclusive. Therefore, the desired number is the least common multiple of the numbers from 2 to 10, decreased by 1, i.e., \(5 \cdot 7 \cdot 8 \cdot 9-1=2520-1=2519\).