小米软件开发方向的,美团是测开。小米第一道大题,测试了很久,死活只能A18%,第二道直接print都能A18%,无语住了,第一道代码现在也不知道哪里有问题,求大佬解答!另外考完剩半小时直接进入美团,选择题做完没剩多少时间,大题第一题甚至还没咋看懂题目,准备直接print了,好家伙,防了一手,只能过自测的用例,运行起来通过率0%,哈哈哈哈太菜了太菜了。继续准备别的笔试了,各位佬也加油~from collections import Counterm,n=map(int,input().split())st1=map(str,input().split())st2=''.join(st1)result=[]for i in range(n): count=0 b,c=map(int,input().split()) a_=st2[b-1:c] counter = Counter(a_) # 记录字典 for key,value in counter.items(): if value>2 and value%2!=0: count+=(value-1)/2 if value%2==0: count+=value/2 if count==(c-b+1)/2: result.append('yes') else: result.append('no')for i in result: print(i)