Skip to content

Commit e198f9c

Browse files
committed
Refactor definition
1 parent 655a729 commit e198f9c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lib/src/easy/13.roman_to_integer/problem.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ L 50
1111
C 100
1212
D 500
1313
M 1000
14-
For example, 2 is written as II in Roman numeral, just two ones added together. 12 is written as XII, which is simply X + II. The number 27 is written as XXVII, which is XX + V + II.
1514

16-
Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not IIII. Instead, the number four is written as IV. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as IX. There are six instances where subtraction is used:
15+
For example, 2 is written as II in Roman numeral, just two ones added together.
16+
12 is written as XII, which is simply X + II. The number 27 is written as XXVII,
17+
which is XX + V + II.
18+
19+
Roman numerals are usually written largest to smallest from left to right.
20+
However, the numeral for four is not IIII. Instead, the number four is written as IV.
21+
Because the one is before the five we subtract it making four. The same principle
22+
applies to the number nine, which is written as IX. There are six instances where
23+
subtraction is used:
1724

1825
I can be placed before V (5) and X (10) to make 4 and 9.
1926
X can be placed before L (50) and C (100) to make 40 and 90.

0 commit comments

Comments
 (0)