Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • \$\begingroup\$ 55 bytes: a=>a.reduce((p,c)=>p.map((e,i)=>e+c[i])).map(x=>x+7>>3) \$\endgroup\$ Commented Jul 8, 2016 at 20:06
  • \$\begingroup\$ @Dendrobium [[0,200,200],[200,0,200],[200,200,0],[60,200,0],[200,0,200],[0,200,220],[2,200,0],[0,0,7]] yields 83, 125, *104* instead of 83, 125, *103* with your code. \$\endgroup\$ Commented Jul 8, 2016 at 20:24
  • \$\begingroup\$ Ah, misread the question, thought it was supposed to ceil. 64 bytes: a=>a.reduce((p,c)=>p.map((e,i)=>e+c[i])).map(x=>(x/8).toFixed()) \$\endgroup\$ Commented Jul 8, 2016 at 20:51
  • \$\begingroup\$ x+4>>3 should round correctly. \$\endgroup\$ Commented Jul 8, 2016 at 21:08