Skip to main content
added 495 characters in body
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55

Jelly, 1010 9 bytes

O%15O:3 ı*SḤA

Try it online!Try it online!

I fiddled around with other functions to see if I could get rid of the space by finding a different one-byte dyad that would take a two-digit number on the left rather than the right, but it turned out that : doesn't need two digits to produce the desired values.

O            Codepoints of the input
 :3          floor divided by 3.
    ı*       Raise sqrt(-1) to the power of each,
      S      sum,
       Ḥ     double,
        A    and take the absolute value.

Jelly, 10 bytes

O%15 ı*SḤA

Try it online!

Jelly, 10 9 bytes

O:3 ı*SḤA

Try it online!

I fiddled around with other functions to see if I could get rid of the space by finding a different one-byte dyad that would take a two-digit number on the left rather than the right, but it turned out that : doesn't need two digits to produce the desired values.

O            Codepoints of the input
 :3          floor divided by 3.
    ı*       Raise sqrt(-1) to the power of each,
      S      sum,
       Ḥ     double,
        A    and take the absolute value.
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55

Jelly, 10 bytes

O%15 ı*SḤA

Try it online!