Description
Roman numerals are represented by seven symbols: I (1), V (5), X (10), L (50), C (100), D (500), M (1000). Given an integer, convert it to a roman numeral.
Examples
Input:
num = 3Output:
"III"Explanation:
3 is represented as 3 ones.
Input:
num = 58Output:
"LVIII"Explanation:
L = 50, V = 5, III = 3.
Input:
num = 1994Output:
"MCMXCIV"Explanation:
M = 1000, CM = 900, XC = 90, IV = 4.
Constraints
- •
1 ≤ num ≤ 3999