This is a kind of
Knapsack problem.
You have a bunch of monsters (M) and a bunch of fighters (N). You are asked to figure out the best way (shortest time) to assign fighters to monsters that each monster is (eventually) fought.
Consider the case where you have 2 fighters, with times = {1, 2}, and 1 monster.
If you assign the fighter with time=1, then "all the monsters" are fought in a total time of 1. If you assign the fighter with time=2, then "all the monsters" are fought in a total time of 2.
We assume that faster is better, so the solution with time=1 is better than the solution with time=2.
Now consider what happens if you have two monsters. You could assign F1 to M1 and F2 to M2. Both monsters would be fought in parallel, with a total time of 2 (because F1 would beat M1 in 1 time unit, then wait for F2 to finish).
Alternatively, you could assign F1 to M1, then assign F1 to M2, in sequence. The total time would be 1 + 1 = 2, again. So there are two solutions with the same "best" time.
Now suppose you have 100 monsters, and 2 fighters with time={1, 30}. If you give all the monsters to F1 it will take 100 time. But if you give 3 monsters to F30, then F30 will finish in 30*3 = 90 time, while F1 handles 97 monsters in 97 time, in parallel. This is a better solution, since 97 < 100 time.
This seems like a "dynamic programming" problem. There are a few popular techniques for solving these sorts of problems, all available on Youtube by asking the Duck.