Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,19 @@
iterator lookAndSay(n: int): string =
var current = "1"
yield current
for round in 2..n:
var ch = current[0]
var count = 1
var next = ""
for i in 1..current.high:
if current[i] == ch:
inc count
else:
next.add $count & ch
ch = current[i]
count = 1
current = next & $count & ch
yield current
for s in lookAndSay(12):
echo s