Work done in compressing a spring?

I got this question for my work but I'm not completely sure how to do it correctly, so I'm looking for someone to guide me on how to do it properly. An answer to the question would be best too.

A spring is used to launch a ball with a mass of 1.00 x 10^-2 kg.
The spring is compressed 10.0 cm using an average force of 35.0 N. For the launch, the ball is placed against the movable end of the spring and the compressed spring is released.

What is the work done in compressing the spring?
A. 0.350 J
B. 3.50 J
C. 35.0 J
D. 350 J

Report as