If there are a total of 39 students in the bike club and all but 8 of them participated in the race, then:
Number of students who participated in the race = Total students - Students who did not participate = 39 - 8 = 31 students
If each student who entered the race paid $6, then the total cost is:
Total cost = Number of students who participated × Cost per student = 31 × $6 = $186
Thus, the total cost is $186.