Python 最长连号
n=int(input())
li=list(map(int,input().split()))
s=1
maxs=0
for i in range(n-1):
if li[i]+1==li[i+1]:
s+=1
else:
s=1
if s>maxs:
maxs=s
print(maxs)
Python 最长连号
n=int(input())
li=list(map(int,input().split()))
s=1
maxs=0
for i in range(n-1):
if li[i]+1==li[i+1]:
s+=1
else:
s=1
if s>maxs:
maxs=s
print(maxs)