The question was:
A spider has 8 legs. It wants to put on 8 different socks and 8 different shoes on each leg, but it must put a sock on before a shoe. What is the total amount of ways?
I thought it would be $8! \times 8!$, since we fix socks, then arrange socks. Then fix shoes, then arrange shoes.
However, my lecturer said it was this:
Form a 16 digit string with only digits $1$ to $8$.
An example is:
THe total amount of ways of having a string of this form will be $16!/(2!)^8$.
I don't see why my answer is incorrect and why their one is. Their explanation was that
"each digit represents that leg. For example, the first digit $1$ is corresponding to putting a sock on the 1st leg. The second $1$ that appears will be the shoe."