This problem is in Contest(s) below:
Contest 1036:YSA Program test(CCC)
Contest 1007:Python加强班作业05
Contest 1006:NOIP--普及组--练习题库