Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 262 characters in body
Source Link
lyxal
  • 35.6k
  • 2
  • 69
  • 148

Keg, -hr, 11 bytes

÷(¿|")(4)⅍(5)∑Z

Try it online!

Explained

÷(¿|")(4)⅍(5)∑Z
÷ # Split m into individual numbers
 (¿|") # n times, shift the stack right
 (4)⅍(5) # turn each character into a string
 ∑Z # sum stack and convert to integer. `-hr` prints it as integer

Keg, -hr, 11 bytes

÷(¿|")(4)⅍(5)∑Z

Try it online!

Keg, -hr, 11 bytes

÷(¿|")(4)⅍(5)∑Z

Try it online!

Explained

÷(¿|")(4)⅍(5)∑Z
÷ # Split m into individual numbers
 (¿|") # n times, shift the stack right
 (4)⅍(5) # turn each character into a string
 ∑Z # sum stack and convert to integer. `-hr` prints it as integer
Source Link
lyxal
  • 35.6k
  • 2
  • 69
  • 148

Keg, -hr, 11 bytes

÷(¿|")(4)⅍(5)∑Z

Try it online!

AltStyle によって変換されたページ (->オリジナル) /