第二题我的一点思路 https://www.nowcoder.com/discuss/388264?type=all&order=time&pos=&page=1