Skip to content

Instantly share code, notes, and snippets.

@mikl745
Created April 4, 2017 20:09
Show Gist options
  • Save mikl745/365d6b94bd5d8407327c7132a96bec84 to your computer and use it in GitHub Desktop.
Save mikl745/365d6b94bd5d8407327c7132a96bec84 to your computer and use it in GitHub Desktop.
версия 1
w = int(input())
a = [list(map(int, input().split())) for x in range(w)]
y = 0
maxCount = 1
maxHeight = a[0]
currentCount = 1
currentHeight = a[0]
for i in range(1,w):
height = a[i]
if currentHeight == height :
currentCount = currentCount + 1
else:
if maxCount < currentCount:
maxCount = currentCount
maxHeight = currentHeight
currentHeight = height
print(maxCount,maxHeight)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment