This problem is in Contest(s) below:
Contest 1070:2022初级算法周日
Contest 1038:CCC Junior 算法基础训练
Contest 1073:7月8日C++String
Contest 1075:Python初级算法字符串