Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,20 @@
import strutils
proc count(s, sub): int =
var i = 0
while true:
i = s.find(sub, i)
if i < 0:
break
inc i
inc result
proc isSelfDescribing(n): bool =
let s = $n
for i, ch in s:
if s.count($i) != parseInt("" & ch):
return false
return true
for x in 0 .. 4_000_000:
if isSelfDescribing(x): echo x