The correct option is B Z
Number of nails picked up shows how easily the material can be magnetised. The number of nails left on the material is a proof of the retained magnetism when current is removed. Therefore, material Z is the best electromagnetise ( attracts 40 nails) and looses its magnetism when the switch opened (left only 3 nails) . Material X is also suitable to use as electromagnet, but not as good as Z.