Skip to content

Commit 9fd2918

Browse files
submission kevsmith#1
1 parent 31dcf4f commit 9fd2918

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

177.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import sys
2+
o = ''
3+
for x in open(sys.argv[1]).read()[::-1].split('\n'):
4+
for s, m, l, n in zip('IXCM', 'VLD.', 'XCM.', x):
5+
n = int(n)
6+
f = n % 5
7+
o += s * f * (f < 4) + (m if n < 9 else l) * (n > 3) + s * (f == 4)
8+
o += '\n'
9+
print(o[::-1])

0 commit comments

Comments
 (0)