#C3995. Integer to Roman Numeral List

    ID: 47483 Type: Default 1000ms 256MiB

Integer to Roman Numeral List

Integer to Roman Numeral List

You are given an integer (n). Your task is to generate a list of Roman numeral representations for all numbers from 1 to (n) (inclusive). The conversion should follow the modern Roman numeral system using the following symbols and values:

[ \begin{array}{cc} 1000 & M \ 900 & CM \ 500 & D \ 400 & CD \ 100 & C \ 90 & XC \ 50 & L \ 40 & XL \ 10 & X \ 9 & IX \ 5 & V \ 4 & IV \ 1 & I \ \end{array} ]

Use a greedy algorithm to perform the conversion. Make sure that your solution handles edge cases such as (n = 1) and larger values up to 50.

inputFormat

The input consists of a single integer (n) (where (1 \leq n \leq 50)) on a single line.

outputFormat

Output exactly (n) lines. Each line must contain the Roman numeral representation of the corresponding integer from 1 to (n) in order.## sample

3
I

II III

</p>