This problem is in Contest(s) below:
Contest 1062:C++打卡测试
Contest 1019:1.7编程基础之字符串(35题)
Contest 1025:C++ L3 课后练习题
Contest 1065:C++测试