Charcoal, 6565 59 bytes
≔Ma⁺Ma-ia hη⟦⁺ηii⟧E↨IΦθ›ι.²⁺ηײ§ouιF№θh⁺ײ⁺⟦i⟧E↨IΦθ‹.E⊟⪪θ鲧ouιEΦθ№…θκ.⁺ηahaF№θ¦aha¿№θ-”(/◧êºcS﹪Z↑M▶#↓
Try it online!Try it online! Link is to verbose version of code. Explanation:
≔Ma⁺Ma-ia hη
Get the string Ma-ia h
into a variable as it is used several times.
⟦⁺ηii⟧
Output Ma-ia hii
on its own line.
E↨IΦθ›ιh⁺ײ⁺⟦i⟧E↨IΦθ‹.²⁺ηײ§ouι鲧ouιEΦθ№…θκ.¦aha
Remove non-digits from the input, convert from base 10
to base 2
, and replace 0
s with Ma-ia hooo
and 1
s with Ma-ia huuu
.
F№θ.E⊟⪪θ.⁺ηaha
If the input contained a Prefix .i
to the resulting list, then outputdouble the letters. Append Ma-ia hahaaha
to the list for each digit after the .
(if any), prepend Ma-ia h
to each element of the list, and output the result.
F№θ¿№θ-”(/◧êºcS﹪Z↑M▶#↓
If the input contained a -
then output Vrei sa pleci dar
using a compressed string.
If an extra Ma-ia hoo
is acceptable for an input of 0
, then for 55 bytes:
⁺Ma-ia h⁺ײ⪪⁺i⍘IΦθ‹.ιou¹EΦθ№…θκ.¦aha¿№θ-”(/◧êºcS﹪Z↑M▶#↓
Attempt This Online! Link is to verbose version of code. Explanation: When converting 0
to a string base the version of Charcoal on TIO always returns 0
but the version of Charcoal on ATO returns the first character of the string. (For a numeric base conversion both versions would return an empty list.)