New answers tagged


Python 3, 34 bytes lambda n,m:sum(range(n**m))and m+n Try it online! Alternatively, as suggested by user202729: Python 2, 26 bytes lambda n,m:n**m*[1]and n+m Try it online! which also works with Python 3.


APL (Dyalog Unicode), 4 bytesSBCS Anonymous tacit infix function: ⊃*⍴+ Try it online! However, if it really needs to take the two arguments together, separated by a space, we need the following anonymous tacit prefix function: APL (Dyalog Unicode), 6 bytesSBCS ⊃*/⍴+/ Try it online! + or +/ sum the numbers ⍴ cyclically reshape that to the following ...

Top 50 recent answers are included