X2 on what Maynard said.
.223, fast twist barrell (heavy barrell) look at a used one, Ruger makes some decent heavy barrelled laminate stocked rifles.
Start reloading, you,re not likely to get the accuracy (slim chance) from factory ammo that your asking for, you,ll have to reload to do it and you,ll learn what's needed to get the accuracy.
$400 won't get you anything decent for a scope, you,re closer to $700 + so look for a USED Rifle in decent shape. Someone local to you from gun nuts could probably point you at a local store that might have what you need.
Start at 100 Yds and learn to use a trigger properly, then move to 200.
M.
I agree with everything Ice Pick said EXCEPT the part about Ruger.
If you want to do upgrades in the future (Stock, Trigger, Barrel etc.) then I would look for a Heavy Barreled Rem 700 or better yet an XR-100 action if you can find one.
Most stock companies build stocks already inletted for these actions, there are many trigger options such as Timney, Canjar and my personal fav, Jewell. They are easy to get trued when you get a match grade barrel and will shoot just as well as a custom action.
My trued Rem XR-100 action in it's original stock (not bedded) with a Krieger barrel and Jewell trigger is doing phenomenally well in competition right now and I have only been shooting for 1.5yrs. We (my gun and I) won the Lower Mainland Regional Championship 3 weeks ago and came 3rd overall in the BC Championships 2 weeks ago shooting from 300m-600m.
Less than $2000 spent (not including the scope) on the rifle which started out originally with a $200 used match barrel that I wore out.....twice
Lots of good advice here, think ahead to the future as to what you may or may not want to do, and buy accordingly.