Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
1 of 17

Task 1, CJam, 7 bytes


I just wanted to get the (presumably) optimal CJam solution for this in. It makes use of the fact that the sum of the first n cubes is the square of the nth triangular number, which is itself the sum of the first n integers.

Test it here.

Task 9, Mathematica, 4 bytes


This is essentially the same as Sp3000's solution, but using more syntactical trickery (and since I'm losing the tie to him, I don't think there's any harm in that). The ## is a sequence with all parameters of the unnamed function. Now 1## is short for 1*##, which is syntactical sugar for Times[1,##] where ## gets expanded into the number and the nested list. Multiplication threads over lists automatically in Mathematica.