第三题: 9% l = list(map(int,input().split())) n = l[0] m = l[1] destroy = {} all = [] for _ in range(m): temp = list(map(int,input().split())) all.append(temp) for temp in all: op=temp[0] pos = temp[1] if op ==1: destroy[pos] = -1 elif op==2: if pos+1 not in destroy and pos<n: print(pos+1) elif pos==n and pos not in destroy: print(pos) else: print(-1) 第四题:55% s = input() K = int(input()) length = len(s) count = 0 for i in range(K,length-K): for v in range(K,min(i+1,len(s)-i)): for j in range(1,len(s)-v): if s[i-v:i]==s[i+j:i+v+j]: count =count+1 print(count) 第五题:还没写完就强制交卷了。。。