"closest to 21"? I'm guessing you mean "Closest to 21 without going over. If it's not possible to prevent going over, return the lowest score possible."
Is that correct?
if you go over 21, your result is basically 0
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.