Skip to main content
-20 bytes
Source Link

Clojure, 58 bytes

(fn[s](-(Math/pow(reduce + s)2)(reduce +(map #(* % %)s))))

Try it online!


Edit: I misunderstood the question

Clojure, 5555, 35 bytes

#(-(Math/pow(* %(+ % 1)1/2)2 %)(*(+- % 1)%(+(* 23 %)12)1/6)12)

Try it online!Try it online!

Clojure, 58 bytes

(fn[s](-(Math/pow(reduce + s)2)(reduce +(map #(* % %)s))))

Try it online!


Edit: I misunderstood the question

Clojure, 55 bytes

#(-(Math/pow(* %(+ % 1)1/2)2)(*(+ % 1)%(+(* 2 %)1)1/6))

Try it online!

Clojure, 58 bytes

(fn[s](-(Math/pow(reduce + s)2)(reduce +(map #(* % %)s))))

Try it online!


Edit: I misunderstood the question

Clojure, 55, 35 bytes

#(* %(+ 1 %)(- % 1)(+(* 3 %)2)1/12)

Try it online!

Add test cases to permalink
Source Link

Clojure, 58 bytes

(fn[s](-(Math/pow(reduce + s)2)(reduce +(map #(* % %)s))))

Try it online!


Edit: I misunderstood the question

Clojure, 55 bytes

#(-(Math/pow(* %(+ % 1)1/2)2)(*(+ % 1)%(+(* 2 %)1)1/6))

Try it online!Try it online!

Clojure, 58 bytes

(fn[s](-(Math/pow(reduce + s)2)(reduce +(map #(* % %)s))))

Try it online!


Edit: I misunderstood the question

Clojure, 55 bytes

#(-(Math/pow(* %(+ % 1)1/2)2)(*(+ % 1)%(+(* 2 %)1)1/6))

Try it online!

Clojure, 58 bytes

(fn[s](-(Math/pow(reduce + s)2)(reduce +(map #(* % %)s))))

Try it online!


Edit: I misunderstood the question

Clojure, 55 bytes

#(-(Math/pow(* %(+ % 1)1/2)2)(*(+ % 1)%(+(* 2 %)1)1/6))

Try it online!

I misunderstood the question
Source Link

Clojure, 58 bytes

(fn[s](-(Math/pow(reduce + s)2)(reduce +(map #(* % %)s))))

Try it online!


Edit: I misunderstood the question

Clojure, 5855 bytes

(fn[s]#(-(Math/pow(reduce* %(+ s% 1)1/2)2)(reduce +*(map+ #% 1)%(+(* %2 %)s)1)1/6))

Try it online!Try it online!

Clojure, 58 bytes

(fn[s](-(Math/pow(reduce + s)2)(reduce +(map #(* % %)s))))

Try it online!

Clojure, 58 bytes

(fn[s](-(Math/pow(reduce + s)2)(reduce +(map #(* % %)s))))

Try it online!


Edit: I misunderstood the question

Clojure, 55 bytes

#(-(Math/pow(* %(+ % 1)1/2)2)(*(+ % 1)%(+(* 2 %)1)1/6))

Try it online!

Source Link
Loading