20分(2、4测试点AC)求助!(Python)
查看原帖
20分(2、4测试点AC)求助!(Python)
296829
Czile楼主2022/11/23 12:01
sample = input().strip().lower()
text = input().strip().lower().split(' ')
num = text.count(sample)

if num != 0: 
    first = text.index(sample)
    print('{} {}'.format(num, first))
else:
    print(-1)

如题所示,只得了20分,两个样例都是通过的,不知道哪里出了问题

2022/11/23 12:01
加载中...