public static int calculateHorsesFinished(List<Horse> horses) throws InterruptedException {
int finishedCount = 0;
//add your implementation here - добавь свою реалзацию тут
for (Horse horse : horses) {
if (!horse.isFinished) {
System.out.println("Waiting for " + horse.getName());
}
else finishedCount++;
}
return finishedCount;
}
