← Back to List

8724번: Pinezki ↗

Solutions

Python 3
137 B | 137 chars
mx = 0
crt = 0
input()
for i in [*map(int, input().split())]:
  if i == 1:
    crt += 1
  else:
    crt = 0
  mx = max(mx, crt)
print(mx)