for 2, there's a much simpler way

using >> and &

请您先登陆,再发跟帖!