A toy gun a spring of force constant `k`. When changed before being triggered in the upward direction, the spring is compressed by a distance `x`. If the mass of the shot is `m`, on the being triggered it will go up to a height of
A. `(kx^(2))/(mg)`
B. `(x^(2))/(kmg)`
C. `(kx^(2))/(2mg)`
D. `((kx)^(2))/(mg)`