Skip to main content
Moved the type declaration into the header. I think this is allowed.
Source Link
musicman523
  • 4.8k
  • 1
  • 25
  • 61

Scala, 3232 26 bytes

(n:Int)=>Listn=>List.fill(n)(n).product

Try it online!Try it online! (Added conversion to long in the TIO so it wouldn't overflow on n=10.)

Scala, 32 bytes

(n:Int)=>List.fill(n)(n).product

Try it online! (Added conversion to long in the TIO so it wouldn't overflow on n=10.)

Scala, 32 26 bytes

n=>List.fill(n)(n).product

Try it online! (Added conversion to long in the TIO so it wouldn't overflow on n=10.)

Source Link
musicman523
  • 4.8k
  • 1
  • 25
  • 61

Scala, 32 bytes

(n:Int)=>List.fill(n)(n).product

Try it online! (Added conversion to long in the TIO so it wouldn't overflow on n=10.)