For cost alone - 9mm all the way
For versatility - a .40 or 357 sig pistol, with different barrels you can switch between 9mm (also needs 9mm mags), .40 (barrel change only), 357 (barrel change only)
If you are in a similar situation as I was at 18 you have very little disposable income. I know I would have gone 9mm when I was 18. But, if you don't get what you really want you will continue to pine for it.