这是下载的数据
输入:
20
3 5 6 2 3 4 5 6 8 9 10 11 12 13 14 15 16 17 18 19
我在自己电脑上跑输出12,在洛谷IDE上也是12,跑别人100的程序也是12,不知道为什么是WA
Max = 1
Count = 1
Length = int(input())
Data = list(map(int, input().split()))
for i in range(Length - 1):
if Data[i+1] == Data[i] + 1:
Count += 1
else:
if Max < Count:
Max = Count
Count = 1
print(Max)