I try solve this problem I know that, I can do that like
for i in range(1,input()):
print int(str(i)*i)
It works, but I can\'t use str
Something that helps here is the equation for a "Repunit". Taking the equation for the i'th Repunit from that Wikipedia page, and substituting 10 in for b (base 10), we get the equation (10**i - 1) / (10 - 1) or (10**i - 1) / 9. This results in the sequence: 1, 11, 111, 1111.... Multiplying by i, we achieve the desired result:
>>> for i in range(1,input()):
... print i * (10**i - 1) / 9
5
1
22
333
4444