Explanation:
since the sequence matters, we have permutations, and without repetition (a person cannot be at more than 1 place in one race).
so, we have
n!/(n-r)!
n = 8
r = 3 (the 3 medal winners out of the 8 racers)
8!/(8-3)! = 8!/5! = 8×7×6 = 336
there are 336 different possible medal winner "pictures".
FYI - you see the difference to combinations without repetitions ?
they would be
n!/(r!×(n-r)!)
so, the difference is the "r!" part in the denominator (the lower side of the fraction). this eliminates the different sequences of the 3 winners as different solutions.
e.g. person1 winning gold, person2 winning silver, person3 winning bronze is for a combination the same solution as e.g. person3 winning gold, person1 winning silver and person2 winning bronze.
but because the sequence of gold, silver and bronze is important, we need to make the different sequences also different solutions. and for this we need to remove the "r!" division. leading to the permutation formula as stated at the beginning.