I am not entirely sure what the assumptions on $m$ are -- clearly if $m>100^2$, then any search is going to be cost 1, so probably the values up to $100^2$ are to be studied or better yet, only a minimal one is to be found.
In the latter case, the respective answers are 19, 29, 23 and 17.
In the former case, say, with 11, you can show that $m=128$ doesn't work since you have the 13 squares of everything which is $4\bmod(8)$, 4 12 20 28 36 44 52 60 68 76 84 92 100
, mapping to $16$. But everything past $128$ works, i.e. you don't need to go up to $m=10^4$.
Similar arguments/remarks work for the rest. The question is, however, what the CS course was about. If its asking about worst-case (as as opposed to average-case) cost of explicit numbers for hash tables, I'd assume something below the level of CLRS (few intro courses aren't...) If that is correct, I'd assume that nobody wanted you to use case-by-case + big guns elementary number theory analysis -- rather they wanted you to write 15 lines of C++ or 10 lines of Python and find out.