Skip to content

Commit a5687d2

Browse files
Update Roman Numbers
1 parent 7210a55 commit a5687d2

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Roman Numbers

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,4 @@ Sample Output
2020
True
2121
---------------------------------------------------------------------------------------------------------
2222

23-
import re
2423

25-
thousand = 'M{0,3}'
26-
hundred = '(C[MD]|D?C{0,3})'
27-
ten = '(X[CL]|L?X{0,3})'
28-
digit = '(I[VX]|V?I{0,3})'
29-
print (bool(re.match(thousand + hundred+ten+digit +'$', input())))

0 commit comments

Comments
 (0)