Skip to content

Commit

Permalink
Update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Haleshot committed Aug 15, 2024
1 parent 89e47c5 commit 6d7cc83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Algomap/roman_to_integer/roman_to_integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def romanToInt(self, s):
# sum += d[next] - d[i]
# sum += d[i]

for i in range(len(s)):
for i in range(len(s) - 1):
print(d[s[i + 1]])
if d[s[i]] < d[s[i + 1]]:
sum += d[s[i + 1]] - d[s[i]]
Expand Down

0 comments on commit 6d7cc83

Please sign in to comment.