Name | Language | Tokens Sum | Tokens Part 1 | Tokens Part 2 | Last change | |
---|---|---|---|---|---|---|
1 | Python | 146 | 88 | 58 | 8 months ago | |
2 | Kotlin | 227 | 123 | 104 | 9 months ago | |
3 | Python | 313 | 170 | 143 | 8 months ago | |
4 | Kotlin | 404 | 221 | 183 | 8 months ago |
fun
main
(
)
=
println
(
generateSequence
(
::
readLine
)
.
map
{
"
"
"
(
\
d
+
)
(
.
)
"
"
"
.
toRegex
(
)
.
findAll
(
it
)
.
fold
(
mapOf
<
String
,
Int
>
(
)
)
{
k
,
m
->
val
(
n
,
c
)
=
m
.
destructured
k
+
c
.
to
(
maxOf
(
k
[
c
]
?:
0
,
n
.
toInt
(
)
)
)
}
.
values
.
reduce
(
Int
::
times
)
}
.
sum
(
)
)