if len(word)>5000 or len(word) == 0: 修改为:if len(input_str)>5000 or len(word) == 0:(题意应该是总的输入字符串在这个范围)
点赞

相关推荐

牛客网
牛客企业服务