fork download
  1. import nre,strutils
  2.  
  3. iterator items(n: int): string =
  4. var num="0"
  5. for i in 1..n:
  6. yield num
  7. num = num.replace(re"(.)\1*", proc(m: string): string =
  8. if m.high<=1: $m.len&m[0] else: $m[0]
  9. )
  10.  
  11. for s in stdin.readLine.parseInt: echo s
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
15
compilation info
prog.nim(1, 8) Error: cannot open 'nre'
stdout
Standard output is empty