Skip to main content
deleted 157 characters in body
Source Link
Emigna
  • 53.2k
  • 5
  • 44
  • 164

05AB1E, 1111 7 bytes

05AB1E uses CP-1252 encoding.

ÐPŠO;sO¹·-P8*¹/P 

Try it online!Try it online!

Explanation

 O # implicitsum input [a,b,c] Ð  ¹ # triplicatepush input P  # product of one copy Š # move to bottom of stack O # sum the second copyagain   ; · # halvemultiply theby sum2   s- # subtract the third copy from this  P # productsum   ¹/ 8* # multiplydivide by 8input   P / # divide the product by this 

05AB1E, 11 bytes

ÐPŠO;s-P8*/ 

Try it online!

Explanation

  # implicit input [a,b,c] Ð  # triplicate input P  # product of one copy Š # move to bottom of stack O # sum the second copy   ; # halve the sum   s- # subtract the third copy from this  P # product   8* # multiply by 8   / # divide the product by this 

05AB1E, 11 7 bytes

05AB1E uses CP-1252 encoding.

O¹·-¹/P 

Try it online!

Explanation

O # sum input ¹ # push input again · # multiply by 2 - # subtract from sum ¹/ # divide by input P # product 
Source Link
Emigna
  • 53.2k
  • 5
  • 44
  • 164

05AB1E, 11 bytes

ÐPŠO;s-P8*/ 

Try it online!

Explanation

 # implicit input [a,b,c] Ð # triplicate input P # product of one copy Š # move to bottom of stack O # sum the second copy ; # halve the sum s- # subtract the third copy from this P # product 8* # multiply by 8 / # divide the product by this