This problem is in Contest(s) below:
Contest 1116:入门班---一维数组
Contest 1161:2025春季入门练习题