2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -0,0 +1,11 @@
|
|||
defmodule Self_describing do
|
||||
def number(n) do
|
||||
digits = Integer.digits(n)
|
||||
Enum.map(0..length(digits)-1, fn s ->
|
||||
length(Enum.filter(digits, fn c -> c==s end))
|
||||
end) == digits
|
||||
end
|
||||
end
|
||||
|
||||
m = 3300000
|
||||
Enum.filter(0..m, fn n -> Self_describing.number(n) end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue