Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -1,6 +1,6 @@
|
|||
>>> def isSelfDescribing(n):
|
||||
s = str(n)
|
||||
return all(s.count(str(i)) == int(ch) for i, ch in enumerate(s))
|
||||
s = str(n)
|
||||
return all(s.count(str(i)) == int(ch) for i, ch in enumerate(s))
|
||||
|
||||
>>> [x for x in range(4000000) if isSelfDescribing(x)]
|
||||
[1210, 2020, 21200, 3211000]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue