Skip to main content
Commonmark migration
Source Link

#05AB1E, 61 9 8 bytes

05AB1E, 61 9 8 bytes

#05AB1E, 61 9 8 bytes

05AB1E, 61 9 8 bytes

added 998 characters in body
Source Link
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384

Whopping -52 bytes\$\color{green}{\textrm{-52 bytes}}\$ thanks to @Adnan, because apparently 05AB1E's Roman Number builtin wasn't documented, haha.. xD

Whopping -52 bytes thanks to @Adnan, because apparently 05AB1E's Roman Number builtin wasn't documented, haha.. xD

Whopping \$\color{green}{\textrm{-52 bytes}}\$ thanks to @Adnan, because apparently 05AB1E's Roman Number builtin wasn't documented, haha.. xD

added 998 characters in body
Source Link
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384

#05AB1E, 6161 9 8 bytes

•1∞Γ'иÛnuÞ\₂…•Ž8вв€SÐ)vŽF¯L.•6#&‘нδ•u3ôNèyè}'M3L×)Rεõš}`3Fâ}€˜JIåXIå

Whopping -52 bytes thanks to @Adnan, because apparently 05AB1E's Roman Number builtin wasn't documented, haha.. xD

Try it online or verify all test cases.

Explanation:

ŽF¯       # Push comressed integer 3999
   L      # Create a list in the range [1,3999]
    .X    # Convert each integer in this list to a roman number string
      Iå  # Check if the input is in this list
          # (and output the result implicitly)

See this 05AB1E tip of mine (section How to compress large integers?) to understand why ŽF¯ is 3999.


Original 61 bytes answer:

•1∞Γ'иÛnuÞ\₂…•Ž8вв€SÐ)v.•6#&‘нδ•u3ôNèyè}'M3L×)Rεõš}`3Fâ}€˜JIå

#05AB1E, 61 bytes

•1∞Γ'иÛnuÞ\₂…•Ž8вв€SÐ)v.•6#&‘нδ•u3ôNèyè}'M3L×)Rεõš}`3Fâ}€˜JIå

#05AB1E, 61 9 8 bytes

ŽF¯L.XIå

Whopping -52 bytes thanks to @Adnan, because apparently 05AB1E's Roman Number builtin wasn't documented, haha.. xD

Try it online or verify all test cases.

Explanation:

ŽF¯       # Push comressed integer 3999
   L      # Create a list in the range [1,3999]
    .X    # Convert each integer in this list to a roman number string
      Iå  # Check if the input is in this list
          # (and output the result implicitly)

See this 05AB1E tip of mine (section How to compress large integers?) to understand why ŽF¯ is 3999.


Original 61 bytes answer:

•1∞Γ'иÛnuÞ\₂…•Ž8вв€SÐ)v.•6#&‘нδ•u3ôNèyè}'M3L×)Rεõš}`3Fâ}€˜JIå
added 2571 characters in body
Source Link
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384
Loading
Source Link
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384
Loading