Problem ยท String
โ— EasyBNPOA

Problem statement

The table below contains some reference values from coverting between integers (i.e. Arabic numerals) and Roman numerals:

Given an integer, convert it to its Roman numeral equivalent.

s

Function

romanizer(numbers: int[]) โ†’ String[]

Complete the function romanizer in the editor below. The function must return an array of strings that represent the integers as their Roman numeral equivalents.

romanizer has the following parameter(s):

  1. int numbers[n]: an array of integers

Returns

string[n]: an array of strings that represent the integers as their Roman numeral equivalents.

Examples

Example 1

numbers = [1, 49, 23]return = ["I", "XLIX", "XXIII"]

Looking at the conversions above, 1 is represented as I (Capital I), 49 is 40 + 9, so XLIX, and 23 is XXIII. The return array is ['I', 'XLIX', 'XXIII'].

Constraints

๐Ÿ๐Ÿ

More BNP problems

drafts saved locally
public String[] romanizer(int[] numbers) {
  // write your code here
}
numbers[1, 49, 23]
expected["I", "XLIX", "XXIII"]
checking account