S2 初级场 A、B、C题(java版题解)https://www.nowcoder.com/discuss/568732