Skip to content

Instantly share code, notes, and snippets.

@popey456963
Created May 20, 2016 20:00
Show Gist options
  • Save popey456963/ddc01ab3ebe06e7f9ea8fd8323d1c73d to your computer and use it in GitHub Desktop.
Save popey456963/ddc01ab3ebe06e7f9ea8fd8323d1c73d to your computer and use it in GitHub Desktop.
r,n,b=(('M',1000),('CM',900),('D',500),('CD',400),('C',100),('XC',90),('L',50),('XL',40),('X',10),('IX',9),('V',5),
('IV',4),('I',1)),int(input()),""
for c,d in r:
while n>=d:b+=c;n-=d
print b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment