The normal rules don't cover this, however there is the Unearthed Arcana: Mass Combat (playtest) material, which describes resolving fights without going through turns. The scale is bigger than what you say (hundreds of creatures on a minute by minute scale), but it might give you a starting point.
In short, you calculate the BR (battle rating, derived from challenge rating) for both sides. Then the sides take turns attacking (initiative order), making opposed BR checks. If the defender wins nothing happens, if the attacker wins by 10 or less, reduce the BR of the defender by 2, if the attacker wins by 11 or more reduce the defender's BR by 5 and make a DC10 moral check to see if they flee.
Like I said, the scale isn't perfect.
I think a system based on rolling die might serve you better--rolling die and random results are the heart of dnd. Roll a d6 to see how many 'rounds' the combat lasted, add a modifier based on CR. For each round, distribute d20s to represent hits and roll off to see how many hits are taken, multiply by the average damage of the encounter. For each turn each caster rolls a d20 compared to their spell list to determine which spells were cast and their spell slots used.
If it's an easy fight then why not just have the players scare off the enemies without expending resources? You can also resolve the encounter with roleplay rather than fighting, or play out 1 or 2 rounds quickly.
You may want to assess why you need this mechanic rather than trying to invent one.