Article snapshot taken from Wikipedia with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
Men's marathon at the European Athletics Championships
The team's time is given by the first three arrivals of each country, but awarded with the medal also the others athletes of the team that finished the race.
"2018 European Athletics Championships - Team Manual" (PDF). european-athletics.org. p. 115. Retrieved 11 September 2018. 12.6.10 EUROPEAN MARATHON CUP SCORING AND TIE - The times of the first three finishing runners in each Team will be aggregated in order to determine the finishing order, the Team with the lowest aggregate time being the winner, and so on. A tie will be resolved in favour of the Team whose last scoring runner finishes nearest to first place. A Team finishing with fewer than three runners will not be classified in the Team result. All runners finishing the race will be classified individually and eligible for individual awards.