Answer
An elastic collision is more effective, as the nail will have a greater momentum after the collision.
Work Step by Step
If the hammer collides perfectly inelastically with the nail, then the hammer and nail move together in the same direction after the collision.
If the hammer collides elastically with the nail, then the hammer bounces back in the opposite direction, while the nail moves in the original direction of the hammer.
By conservation of momentum, the nail's change in momentum is equal in magnitude to the hammer's change in momentum. If the hammer bounces back in the opposite direction, then the change in momentum is greater than if the hammer kept moving in the same direction at a reduced speed.
Therefore, an elastic collision is more effective, as the nail will have a greater momentum after the collision.