This problem is in Contest(s) below:
Contest 1057:Python-第4章-字符串-2024
Contest 1063:2024-WE 百题大战08:字符和字符串处理