Skip to main content
2 of 3
added 177 characters in body
Okx
  • 16.4k
  • 5
  • 43
  • 113

Neim, 7 bytes

'π𝐂𝕋𝐎S𝕊

Explanation:

'π         Push 345
  𝐂        Get the characters
   𝕋       Vectorised multiply with the input
    𝐎       Sum the resulting list
     S𝕊    Subtract the input

Alternative program: 3𝐈ᛖ𝕋𝐎S𝕊

Instead of pushing 345 and then getting the characters, creates the array [1 2 3] using 3𝐈, then add 2 to each element with ᛖ.

Try it online!

Okx
  • 16.4k
  • 5
  • 43
  • 113