This problem is in Contest(s) below:
Contest 1029:GSS XACode 2019
Contest 1035:Python 2 阶段验收--测试题
Contest 1040:CCC Junior 实战刷题