Skip to main content
3 of 5
added 21 characters in body; added 10 characters in body
Makonede
  • 6.8k
  • 21
  • 49

05AB1E, 9 bytes

sUXGD}XGm 

Try it online!

 # (implicit) push STDIN to stack s # swap top two stack values U # store top of stack in X X # push X to stack G # for N in [1, 2, ..., top of stack - 1]... D # duplicate top of stack } # exit loop X # push X to stack G # for N in [1, 2, ..., top of stack - 1]... m # push (second to top of stack) ^ (top of stack) # (implicit) exit loop, output top of stack to STDOUT 
Makonede
  • 6.8k
  • 21
  • 49