#C5375. Integer to Roman Numeral Conversion

    ID: 49017 Type: Default 1000ms 256MiB

Integer to Roman Numeral Conversion

Integer to Roman Numeral Conversion

Given an integer (n) such that (1 \le n \le 3999), convert it to its Roman numeral representation. The conversion uses the following mapping: (1000 \to M), (900 \to CM), (500 \to D), (400 \to CD), (100 \to C), (90 \to XC), (50 \to L), (40 \to XL), (10 \to X), (9 \to IX), (5 \to V), (4 \to IV), and (1 \to I).

For example, an input of 1994 should output MCMXCIV.

inputFormat

The input consists of a single line containing an integer (n) ((1 \le n \le 3999)).

outputFormat

Output a single line containing the Roman numeral representation of the given integer.## sample

1
I

</p>