Name | Language | Tokens Sum | Tokens Part 1 | Tokens Part 2 | Last change | |
---|---|---|---|---|---|---|
1 | LiquidFun | Python | 10103 | 103 | - | 11 months ago |
import
re
rl
,
_
,
*
lines
=
open
(
0
)
tree
=
{
top
:
lr
for
top
,
*
lr
in
(
re
.
findall
(
r
'
[
A
-
Z
]
{
3
}
'
,
line
)
for
line
in
lines
)
}
s
=
0
curr
=
'
A
A
A
'
while
not
curr
.
endswith
(
'
Z
'
)
:
curr
=
tree
[
curr
]
[
rl
[
s
%
len
(
rl
.
strip
(
)
)
]
==
'
R
'
]
s
+=
1
print
(
s
)