Skip to main content
Commonmark migration
Source Link

##Python, 38 bytes

Python, 38 bytes

lambda l:[sum(r)+4>>3for r in zip(*l)]

Rounds the average (towards the nearest integer, with halves rounding up) by adding 4 to the sum, then floor-dividing by 8 via the bit-shift >>3.

##Python, 38 bytes

lambda l:[sum(r)+4>>3for r in zip(*l)]

Rounds the average (towards the nearest integer, with halves rounding up) by adding 4 to the sum, then floor-dividing by 8 via the bit-shift >>3.

Python, 38 bytes

lambda l:[sum(r)+4>>3for r in zip(*l)]

Rounds the average (towards the nearest integer, with halves rounding up) by adding 4 to the sum, then floor-dividing by 8 via the bit-shift >>3.

added 22 characters in body
Source Link
xnor
  • 150.1k
  • 27
  • 291
  • 678

##Python 2, 3938 bytes

lambda l:[(sum[sum(r)+4)/8for+4>>3for r in zip(*l)]

Rounds the average (towards the nearest integer, with halves rounding up) by adding 4 to the sum before, then floor-dividing by 8 via the bit-shift >>3.

##Python 2, 39 bytes

lambda l:[(sum(r)+4)/8for r in zip(*l)]

Rounds the average (towards the nearest integer, with halves rounding up) by adding 4 to the sum before floor-dividing by 8.

##Python, 38 bytes

lambda l:[sum(r)+4>>3for r in zip(*l)]

Rounds the average (towards the nearest integer, with halves rounding up) by adding 4 to the sum, then floor-dividing by 8 via the bit-shift >>3.

Source Link
xnor
  • 150.1k
  • 27
  • 291
  • 678

##Python 2, 39 bytes

lambda l:[(sum(r)+4)/8for r in zip(*l)]

Rounds the average (towards the nearest integer, with halves rounding up) by adding 4 to the sum before floor-dividing by 8.