Your lens is pure manual focus.
The A/M switch controls how the aperture works. On a modern camera you'll have to set to M (Manual) at all times which means that you manually set the apeture of the lens (the A was to enable yesteryears cameras to stop down the aperture "automatically" for you when you press the shutter button).
The adapter you need is
this one which allows for a screw mount lens to be mounted on a K mount bayonet camera.
All this is probably too much trouble and you may be better off looking for an smc Pentax-A
50mm F1.7 or
F2.0 lens. They can be had for about $50. These lenses are also manual focus but they don't need an adapter.