One thing I noticed is that min/max functions are tricky to use and it's easily to accidentally do the wrong thing, like in this case
Because you think "you want the minimum (that is, the number should be at least 8) of those numbers to be 8" then you slap min(). And you got it wrong. You should have used max()