🎁 Exclusive Offer! Join our
Telegram Channel
to get **special discounts** and updates! 🚀
Question 70 - 100% Working Solution | Buy Now
Description
9 Live
Roman Numerals
You are given an array of integers. Your task is to convert each integer into its Roman numeral equivalent.
The following table contains some reference values for converting between Arabic (standard integers) and Roman numerals:
Arabic - Roman
1 - I
4 - IV
5 - V
9 - IX
10 - X
40 - XL
50 - L
90 - XC
100 - C
400 - CD
500 - D
900 - CM
1000 - M
Example
Input: numbers = [1, 49, 23]
Output: ["I", "XLIX", "XXIII"]
Explanation:
1 is "I"
49 is 40 + 9 → "XL" + "IX" = "XLIX"
23 is 10 + 10 + 3 → "X" + "X" + "III" = "XXIII"
Function Description
Complete the function romanizer in the editor below.
romanizer has the following parameters:
int numbers[n]: an array of integers
Returns
string[n]: an array of strings that represent the integers as their Roman numeral equivalents.
Constraints
1 ≤ n ≤ 1000
1 ≤ numbers[i] ≤ 1000