Python 3 的题解 https://ac.nowcoder.com/discuss/573967