Name | Language | Tokens Sum | Tokens Part 1 | Tokens Part 2 | Last change | |
---|---|---|---|---|---|---|
1 | Sharparam | Ruby | 72 | 38 | 34 | 47 days ago |
2 | Frederik Bonfanti | Ruby | 72 | 40 | 32 | 34 days ago |
3 | Mechazawa | Bash | 82 | 48 | 34 | 39 days ago |
4 | CornerMercury | Python | 89 | 48 | 41 | 42 days ago |
5 | dbasden | Python | 90 | 48 | 42 | 45 days ago |
6 | Napat Srichan | Python | 117 | 60 | 57 | 45 days ago |
7 | Michael Böiers | Kotlin | 145 | 79 | 66 | 37 days ago |
8 | Gorane7 | Python | 149 | 80 | 69 | 47 days ago |
9 | Valentin Slawicek | Kotlin | 157 | 83 | 74 | 47 days ago |
10 | Evan | Swift | 195 | 103 | 92 | 47 days ago |
11 | ASanonymous | Python | 10058 | 58 | - | 42 days ago |
fun
main
(
)
=
generateSequence
(
::
readLine
)
.
map
{
it
.
split
(
"
"
)
.
map
(
String
::
toInt
)
.
zipWithNext
(
)
[
0
]
}
.
unzip
(
)
.
run
{
println
(
first
.
sorted
(
)
.
zip
(
second
.
sorted
(
)
)
.
sumOf
{
Math
.
abs
(
it
.
first
-
it
.
second
)
}
)
}