According to my interpretation of Table I of http://neilsloane.com/doc/Me54.pdf it was not known at the time whether you needed bit ($q=2$) strings of length $n=23$, $n=22$, or possibly only of length $n=21$, to construct a set of $x=50$ codewords that are separated from each other by at least Hamming distance $d=10$. This particular example may or may not still be an open question, but there is probably not a known general formula for $n$ in terms of $q$, $x$, and $d$.
Edit: The bounds update at http://webfiles.portal.chalmers.se/s2/research/kit/bounds/unr.html shows that $n$ is now known to be $22$ for the example above, but you can still see that a nice way to compute the function you want has not been discovered.