Romanizer
Problem statement
Convert every integer in numbers to its standard Roman numeral representation and return the representations in input order.
Use subtractive notation such as IV, IX, XL, XC, CD, and CM.
| Value | 1000 | 900 | 500 | 400 | 100 | 90 | 50 | 40 | 10 | 9 | 5 | 4 | 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Roman numeral | M | CM | D | CD | C | XC | L | XL | X | IX | V | IV | I |
Function
romanizer(numbers: int[]) → String[]Examples
Example 1
numbers = [1, 49, 23]return = ["I", "XLIX", "XXIII"]1 is I. The number 49 is 40 + 9, or XLIX. The number 23 is XXIII.
Constraints
1 <= numbers.length <= 101 <= numbers[i] <= 1000