This problem is in Contest(s) below:
Contest 1183:基础课程-一维数组
Contest 1162:2025春季入门班课程
Contest 1167:信奥入门班课程