Name | Language | Tokens Sum | Tokens Part 1 | Tokens Part 2 | Last change | |
---|---|---|---|---|---|---|
1 | Sharparam | Ruby | 72 | 38 | 34 | 25 hours ago |
2 | Ricardo Bittencourt | Python | 75 | 34 | 41 | 5 hours ago |
4 | Gorane7 | Python | 149 | 80 | 69 | 27 hours ago |
5 | Valentin Slawicek | Kotlin | 157 | 83 | 74 | 32 hours ago |
6 | Evan | Swift | 195 | 103 | 92 | 28 hours ago |
7 | David Basden | Python | 10056 | 56 | - | 15 hours ago |
let
lists
:
[
String
]
=
AnyIterator
{
readLine
(
)
}
.
filter
{
!
$0
.
isEmpty
}
print
(
zip
(
lists
.
map
{
Int
(
$0
.
split
(
separator
:
"
"
)
.
first
!
)
!
}
.
sorted
(
)
,
lists
.
map
{
Int
(
$0
.
split
(
separator
:
"
"
)
.
last
!
)
!
}
.
sorted
(
)
)
.
reduce
(
0
)
{
partialResult
,
input
in
partialResult
+
abs
(
input
.
0
-
input
.
1
)
}
)