Add Badge
This commit is contained in:
parent
f214201581
commit
e15d83107b
|
@ -7,6 +7,10 @@ Mix.install([
|
||||||
])
|
])
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Run Me
|
||||||
|
|
||||||
|
[](https://livebook.dev/run?url=https%3A%2F%2Fgit.kev.pub%2Fkev%2Faoc2024%2Fraw%2Fbranch%2Fmain%2Fday01.livemd)
|
||||||
|
|
||||||
## Input
|
## Input
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
|
@ -43,6 +47,6 @@ input
|
||||||
|
|
||||||
f = Enum.frequencies(y)
|
f = Enum.frequencies(y)
|
||||||
|
|
||||||
Enum.map(xfn xx -> xx * (f[xx] || 0) end)
|
Enum.map(x, fn xx -> xx * (f[xx] || 0) end)
|
||||||
|> Enum.sum
|
|> Enum.sum
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue