Name | Language | Tokens Sum | Tokens Part 1 | Tokens Part 2 | Last change | |
---|---|---|---|---|---|---|
1 | LiquidFun | Python | 146 | 88 | 58 | 11 months ago |
2 | anonymous | Kotlin | 227 | 123 | 104 | 12 months ago |
3 | Mustafa Furkan Kaptan | Python | 313 | 170 | 143 | 11 months ago |
4 | Valentin Slawicek | Kotlin | 404 | 221 | 183 | 11 months ago |
5 | CornerMercury | Python | 10059 | - | 59 | 3 days 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
(
)
)