#C6983. Integer to Roman Numerals
Integer to Roman Numerals
Integer to Roman Numerals
Given an integer \(N\) such that \(1 \leq N \leq 3999\), convert it to its Roman numeral representation. Roman numerals are based on the following symbols: I, V, X, L, C, D, and M. The conversion is performed by greedily subtracting values and appending corresponding symbols.
For example, when \(N = 58\), the output is LVIII, and when \(N = 1994\), the output is MCMXCIV.
inputFormat
The input is provided as a single line from stdin containing one integer (N) where (1 \leq N \leq 3999).
outputFormat
Output the Roman numeral representation of the given integer (N) to stdout.## sample
3
III