Name | Language | Tokens Sum | Tokens Part 1 | Tokens Part 2 | Last change | |
---|---|---|---|---|---|---|
1 | Visible-Bag4062 | Python | 180 | 57 | 123 | 13 months ago |
2 | LiquidFun | Python | 188 | 71 | 117 | 12 months ago |
3 | Mustafa Furkan Kaptan | Python | 202 | 70 | 132 | 13 months ago |
4 | Valentin Slawicek | Kotlin | 523 | 233 | 290 | 13 months ago |
lines
=
open
(
0
)
.
readlines
(
)
repeat
=
[
1
]
*
len
(
lines
)
for
i
,
line
in
enumerate
(
lines
)
:
right
,
left
=
line
.
split
(
"
:
"
)
[
1
]
.
split
(
"
|
"
)
shared
=
len
(
set
(
right
.
split
(
)
)
&
set
(
left
.
split
(
)
)
)
if
shared
:
for
j
in
range
(
i
+
1
,
min
(
i
+
1
+
shared
,
len
(
lines
)
)
)
:
repeat
[
j
]
+=
repeat
[
i
]
print
(
sum
(
repeat
)
)