Python
Объяснение:
a = int(input())
b, d = ['0'] * 10 , '0123456789'
for i in range(1, 1 + a):
c = str(i)
for j in range(len(str(i))):
k = d.index(c[j])
b[k] = str(int(b[k]) + 1)
print(' '.join(b))
Python
Объяснение:
a = int(input())
b, d = ['0'] * 10 , '0123456789'
for i in range(1, 1 + a):
c = str(i)
for j in range(len(str(i))):
k = d.index(c[j])
b[k] = str(int(b[k]) + 1)
print(' '.join(b))