Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- number = int(input())
- x = number % 10
- y = number // 10
- result = ''
- if y <= 3:
- result += "X"*y
- elif y == 4:
- result += "XL"
- elif y <= 8 and y >=5:
- result += "L" + "X"*(y-5)
- elif y == 9:
- result = "XC"
- elif y == 10:
- result = "C"
- if x <= 3:
- print("I"*x)
- elif x == 4:
- print("IV")
- elif x <= 8 and x >=5:
- print("V" + "I" *(x-5))
- elif x == 9:
- print("IX")
- elif x == 10:
- print("X")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement