Update script.js
Browse files
script.js
CHANGED
|
@@ -4,7 +4,7 @@ v=Object.entries(i).sort((e,f)=>f[0].length-e[0].length).map(e=>[e[0].replace("
|
|
| 4 |
s=q("input").value
|
| 5 |
t=[]
|
| 6 |
while(s){w=v.find(u=>s.startsWith(u[0]))
|
| 7 |
-
if(w){s.
|
| 8 |
t.push(w[1])}
|
| 9 |
else{t.push(-1)
|
| 10 |
break}}
|
|
|
|
| 4 |
s=q("input").value
|
| 5 |
t=[]
|
| 6 |
while(s){w=v.find(u=>s.startsWith(u[0]))
|
| 7 |
+
if(w){s=s.slice(w[0].length)
|
| 8 |
t.push(w[1])}
|
| 9 |
else{t.push(-1)
|
| 10 |
break}}
|