Post History
Haskell, 271 bytes import Data.Char import Data.List n=" IVXLCDM" r x=maximum[if(s`isInfixOf`x)then s else"A"|s<-words$concat$map(\x->(n!!div x 8):[(n!!(x-8*(div x 8)))])$map(\x->ord...
Answer
#1: Initial revision
# [Haskell], 271 bytes <!-- language-all: lang-hs --> import Data.Char import Data.List n=" IVXLCDM" r x=maximum[if(s`isInfixOf`x)then s else"A"|s<-words$concat$map(\x->(n!!div x 8):[(n!!(x-8*(div x 8)))])$map(\x->ord x-32)"&PW!H.!@/$HF$@G\"H6\"@7\"03#P?%N%O%U%]%^%_&N&O!*!+!1!=!9!<!:!;$=$<\"*\"+#M#N#L#O#K#C#=#<%MH))\'_X;;"] [Try it online!][TIO-lv94dy9w] [Haskell]: https://www.haskell.org/ [TIO-lv94dy9w]: https://tio.run/##hZBRT9swEMff8ynOdtLFpWUDJMbaeitKNVKtaatJ6yI1HVg0US0Sp4oN@GHfvTi0QMQL/5e7@@nuf6fbcHWX5vluJ4ptWWkYcc2Pgw2vnCaYCKUdyTCMF/EkGEXYqcCwghtR3BdLkfnqRqixzISZZTeG6k0qQUGaqxRf4v9q0H0sq7Vyb0t5y7Vb8K2fmO53XyK0Fg9g4IL2lnXlm@5F239hlK7oa7M1ANM9O6W4Nf@LwmM0/OyGP93hVYLD8wQPvyb4yxmZ//Cm3sz74628f951a9qaoTY6QieIoW9ogHqo7zJ3kOB2go9IRKZkQmbkFwkIIwMvCilNPl3H/T5e7e5k@Sh/p@o@14otfRwFVvFijDu4zjDtgIVWk8CiOtmjsZUFz@HQE8d7dtkAi0YdRyPrbEF88Kg3xYeJlaNTpV8OyV5/lykNpgMV7DPKmK@kfZH9GjRvd6oPR99PFFxIYLAuHQDYVkJqOJi8ARd4nkO9sXGes3sC "Haskell – Try It Online"