Question

A 0.311 kg mass slides on a frictionless floor with a speed
of1.25 m/s. The mass strikes and compresses a spring with a
forceconstant of 47.3 N/m. How far does the mass travel after
contactingthe spring before it comes to rest?