Spaces:
Runtime error
Runtime error
JacobLinCool
commited on
Commit
•
a785393
1
Parent(s):
127a90a
fix: recognized string length too small
Browse files- src/solve.py +3 -0
src/solve.py
CHANGED
@@ -22,6 +22,9 @@ def normalize(s: str) -> str:
|
|
22 |
|
23 |
s = s.replace(" ", "").lower()
|
24 |
|
|
|
|
|
|
|
25 |
# if first is number
|
26 |
if s[0].isdigit() and s[2].isdigit():
|
27 |
if s[1] in ["+", "4"]:
|
|
|
22 |
|
23 |
s = s.replace(" ", "").lower()
|
24 |
|
25 |
+
if len(s) < 3:
|
26 |
+
return ""
|
27 |
+
|
28 |
# if first is number
|
29 |
if s[0].isdigit() and s[2].isdigit():
|
30 |
if s[1] in ["+", "4"]:
|