Skip to content

Instantly share code, notes, and snippets.

@mikl745
Created April 4, 2017 19:26
Show Gist options
  • Save mikl745/04a783510b7304cb5c56b99bac2371f1 to your computer and use it in GitHub Desktop.
Save mikl745/04a783510b7304cb5c56b99bac2371f1 to your computer and use it in GitHub Desktop.
w = int(input())
a = [list(map(int, input().split())) for x in range(w)]
y = 0
j = []
for i in range(w):
if i == 0:
y = 1
else:
if a[i-1]==a[i]:
y=y+1
else:
j.append(y,a[i-1])
t = max(j)
print(*t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment