Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ENIθEθθ
Try it online!Try it online!
-4 bytes thanks to Neil, -1 byte thanks to Erik the Outgolfer
E Iθ Map with lambda returning first input cast to integer N Implicit range over next (first) input
ENIθ
Try it online!
Eθθ
-4 bytes thanks to Neil
NθEθθENIθ
Nθ Store next input as number to q E θ Map with lambda returning q θ implicit range over q
Alternatively-4 bytes thanks to (thanks againNeil, -1 byte thanks to Neil):
EIθIθ
Try it online!Erik the Outgolfer
E Iθ Map with lambda returning q (first input) castedcast to integer Iθ N q castedImplicit torange integerover next (first) input
NθEθθ
Alternatively (thanks again to Neil):
E Iθ Map with lambda returning q (first input) casted to integer Iθ q casted to integer