Skip to main content
added 561 characters in body
Source Link
loopy walt
  • 16.8k
  • 2
  • 11
  • 69

Python, 5757, 54 bytes (@GB)

lambda a,y,x,i=0:sum((r*(i:=i+x))[i-x]for r in a[::y])

Attempt This Online!

Old version

lambda a,y,x,i=0:sum(r[(i:=i%len(r)+x)-x]for r in a[::y])

Attempt This Online!

Expects a list of lists of 0s and 1s plus two integers.

Python, 57 bytes

lambda a,y,x,i=0:sum(r[(i:=i%len(r)+x)-x]for r in a[::y])

Attempt This Online!

Expects a list of lists of 0s and 1s plus two integers.

Python, 57, 54 bytes (@GB)

lambda a,y,x,i=0:sum((r*(i:=i+x))[i-x]for r in a[::y])

Attempt This Online!

Old version

lambda a,y,x,i=0:sum(r[(i:=i%len(r)+x)-x]for r in a[::y])

Attempt This Online!

Expects a list of lists of 0s and 1s plus two integers.

Source Link
loopy walt
  • 16.8k
  • 2
  • 11
  • 69

Python, 57 bytes

lambda a,y,x,i=0:sum(r[(i:=i%len(r)+x)-x]for r in a[::y])

Attempt This Online!

Expects a list of lists of 0s and 1s plus two integers.