Name | Language | Tokens Sum | Tokens Part 1 | Tokens Part 2 | Last change | |
---|---|---|---|---|---|---|
1 | Ruby | 120 | 60 | 60 | 8 months ago | |
2 | Python | 134 | 64 | 70 | 8 months ago | |
3 | FSFabian Schedler | Kotlin | 158 | 77 | 81 | 9 months ago |
def
extrapolate
(
seq
)
seq
.
all?
(
0
)
?
0
:
extrapolate
(
seq
.
each_cons
(
2
)
.
map
{
_2
-
_1
}
)
+
seq
.
last
end
puts
$<
.
readlines
(
chomp
:
true
)
.
map
{
extrapolate
_1
.
split
.
map
(
&
:to_i
)
}
.
sum