Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

k = int(input())

now = 1
step = 1


def sunuke(n):
    r = 0
    while n:
        r += n % 10
        n //= 10
    return r


def ok(a, b):
    return a * s(b) <= b*s(a)


while k:
    if ok(now, now+step):
        print(now)
        k -= 1
        now += step
    else:
        nstep = step*10
        while now % nstep != nstep-1:
            now += step
        step = nstep


Fixed submission:
#!/usr/bin/env python3

k = int(input())

now = 1
step = 1


def sunuke(n):
    r = 0
    while n:
        r += n % 10
        n //= 10
    return r


def ok(a, b):
    return a * sunuke(b) <= b*sunuke(a)


while k:
    if ok(now, now+step):
        print(now)
        k -= 1
        now += step
    else:
        nstep = step*10
        while now % nstep != nstep-1:
            now += step
        step = nstep

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

k = int(input())

keta = 3

ans_c = []
sunuke = []
for i in range(1, 10**keta):  # 1~999
    a = i
    b = sum([int(j) for j in str(i)])
    tmp_sunuke = a/b
    ans_c.append(a)
    sunuke.append(tmp_sunuke)

base = 10
nines = 9
while(len(ans_c) <= 100000):
    for i in range(10**(keta-1), 10**keta):  # 1000~999
        a = i*base+nines
        b = sum([int(j) for j in str(i)])
        tmp_sunuke = a/b
        ans_c.append(a)
        sunuke.append(tmp_sunuke)
    base *= 10
    nines = nines*10 + 9
    # print(len(ans_c))

# print(ans_c)

tmp = 10**10
ans = []
for i in reversed(range(len(ans_c))):
    if sunuke[i] <= tmp:
        tmp = sunuke[i]
        ans.append(ans_c[i])
# print(ans)


for i in range(0, k):
    print(ans[-1-i])


Fixed submission:
#!/usr/bin/env python3

k = int(input())

now = 1
step = 1


def sunuke(n):
    r = 0
    while n:
        r += n % 10
        n //= 10
    return r


def ok(a, b):
    return a * sunuke(b) <= b*sunuke(a)


while k:
    if ok(now, now+step):
        print(now)
        k -= 1
        now += step
    else:
        nstep = step*10
        while now % nstep != nstep-1:
            now += step
        step = nstep

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3

k = int(input())

keta = 4

ans_c = []
sunuke = []
for i in range(1, 10**keta):  # 1~9999
    a = i
    b = sum([int(j) for j in str(i)])
    tmp_sunuke = a/b
    ans_c.append(a)
    sunuke.append(tmp_sunuke)

base = 10
nines = 9
while(len(ans_c) <= 9000000):
    for i in range(1000, 10**keta):  # 1000~9999
        a = i*base+nines
        b = sum([int(j) for j in str(i)])
        tmp_sunuke = a/b
        ans_c.append(a)
        sunuke.append(tmp_sunuke)
    base *= 10
    nines = nines*10 + 9
    # print(len(ans_c))

# print(ans_c)

tmp = 10**10
ans = []
for i in reversed(range(len(ans_c))):
    if sunuke[i] <= tmp:
        tmp = sunuke[i]
        ans.append(ans_c[i])
# print(ans)


for i in range(0, k):
    print(ans[-1-i])


Fixed submission:
#!/usr/bin/env python3

k = int(input())

now = 1
step = 1


def sunuke(n):
    r = 0
    while n:
        r += n % 10
        n //= 10
    return r


def ok(a, b):
    return a * sunuke(b) <= b*sunuke(a)


while k:
    if ok(now, now+step):
        print(now)
        k -= 1
        now += step
    else:
        nstep = step*10
        while now % nstep != nstep-1:
            now += step
        step = nstep