This problem is in Contest(s) below:
Contest 4918:基础C-第3课-回家作业(童)
Contest 4950:基础C-第3课-回家作业(崔)