def foo(value): dict1 = {} a = 0 num =0 for i in range(len(value)): if value[i] in dict1: num = max(dict1[value[i]],num) a = max(i-num+1, a) dict1[value[i]] = i+1 print(a) foo('hello') foo('aaaaa') 运行结果: 3 1
SQL语句如下: delete from number where ID not in (select min(ID) from number group by Name)
答案:
这个题目自己做吧!!!