Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

1 of 3
Riolku
  • 451
  • 2
  • 4

Python 3, 96 bytes

def f(a,c=0,p=0):
	for x in a:
		if p and x:return
		p|=x;c+=1
		if p and c>=p:c=p=0
	return p<1

Try it online!

Riolku
  • 451
  • 2
  • 4

AltStyle によって変換されたページ (->オリジナル) /