Skip to content

Commit 1e48591

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5de6f72 commit 1e48591

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

conversions/roman_numerals.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
def roman_to_int(roman: str) -> int:
1010
"""
1111
Convert a Roman numeral to an integer, supporting Vinculum notation (underscore _ represents 1000 times).
12-
LeetCode No. 13 Roman to Integer
13-
​    Given a roman numeral, convert it to an integer.
14-
​    Input is guaranteed to be within the range from 1 to 3999.
15-
​    https://en.wikipedia.org/wiki/Roman_numerals
12+
LeetCode No. 13 Roman to Integer
13+
​    Given a roman numeral, convert it to an integer.
14+
​    Input is guaranteed to be within the range from 1 to 3999.
15+
​    https://en.wikipedia.org/wiki/Roman_numerals
1616
​    >>> all(roman_to_int(key) == value for key, value in tests.items())
1717
>>> tests = {"III": 3, "CLIV": 154, "MIX": 1009, "MMD": 2500, "MMMCMXCIX": 3999, "I_V_": 4000, "X_": 10000, "M_": 1000000}
1818
>>> all(roman_to_int(key) == value for key, value in tests.items())
@@ -34,7 +34,7 @@ def roman_to_int(roman: str) -> int:
3434
def int_to_roman(number: int) -> str:
3535
"""
3636
Convert an integer to a Roman numeral, supporting Vinculum notation (underscore _ represents 1000 times).
37-
 Given a integer, convert it to an roman numeral.
37+
 Given a integer, convert it to an roman numeral.
3838
​    https://en.wikipedia.org/wiki/Roman_numerals
3939
>>> tests = {"III": 3, "CLIV": 154, "MIX": 1009, "MMD": 2500, "MMMCMXCIX": 3999, "I_V_": 4000, "X_": 10000, "M_": 1000000}
4040
>>> all(int_to_roman(value) == key for key, value in tests.items())

0 commit comments

Comments
 (0)