FastPrepRomanizer

Romanizer

BNP Paribas logoBNP Paribas● EasyOA

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.

Value1000900500400100905040109541
Roman numeralMCMDCDCXCLXLXIXVIVI

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 <= 10
  • 1 <= numbers[i] <= 1000

More BNP Paribas problems

See BNP Paribas hiring insights
Saved
public String[] romanizer(int[] numbers) {
  // write your code here
}
numbers[1, 49, 23]
expected["I", "XLIX", "XXIII"]
Checking account…