This problem is in Contest(s) below:
Contest 1005:Python加强班作业04
Contest 1006:NOIP--普及组--练习题库
Contest 1024:YSA入学测试-初中
Contest 1038:CCC Junior 算法基础训练
Contest 1073:7月8日C++String
Contest 1075:Python初级算法字符串