~/algor $ cat problems/case-katta-rim-raqami
Writing in Roman numerals
Medium
1000 ms
64 MB
46%
Write a positive integer $n$ in Roman numerals. Signs: I — $1$, V — $5$, X — $10$, L — $50$, C — $100$, D — $500$, M — $1000$. The number is written digit by digit from left to right: thousands, hundreds, tens, units. The digit of each place is written with that place's signs (I, V, X for units; X, L, C for tens; C, D, M for hundreds; M for thousands). For units: $1, 2, 3$ — I, II, III; $4$ — IV; $5$ — V; $6, 7, 8$ — VI, VII, VIII; $9$ — IX; $0$ — nothing is written. For example, $1994$ is MCMXCIV.
Input
One positive integer $n$.
Output
The number in Roman numerals — capital Latin letters with no spaces.
Note
$1 \le n \le 3999$
Examples
Input #1
2026
Output #1
MMXXVI
Input #2
49
Output #2
XLIX