Skip to content

Commit 41561e1

Browse files
authored
Update Roman to Integer.java
1 parent 5128f93 commit 41561e1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Java/Roman to Integer.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
1533541868
33
tags: Math, String
44

5-
熟悉罗马字母规则
6-
1. 'I V X L C D M' 分别代表的数字
7-
2. 列举combo的情况需要从原sum里面减掉多加的部分'IV, IX'减2, 'XL, XC'减20, 'CD, CM'减200.
5+
#### String
6+
- 熟悉罗马字母规则
7+
- 1. 'I V X L C D M' 分别代表的数字
8+
- 2. 列举combo的情况需要从原sum里面减掉多加的部分: 'IV, IX'减2, 'XL, XC'减20, 'CD, CM'减200.
9+
- Leading `I(1*2)`, `X(10*2)`, `C(100*2)` causes double counting
810

911
https://en.wikipedia.org/wiki/Roman_numerals
1012

0 commit comments

Comments
 (0)