python 计算页码的个数--暴力破解版
num = int(input())#输入页码
page = [0,0,0,0,0,0,0,0,0,0]
for i in range(1,num+1):
list1 = list(str(i))
page[0]+=list1.count('0')
page[1]+=list1.count('1')
page[2]+=list1.count('2')
page[3]+=list1.count('3')
page[4]+=list1.count('4')
page[5]+=list1.count('5')
page[6]+=list1.count('6')
page[7]+=list1.count('7')
page[8]+=list1.count('8')
page[9]+=list1.count('9')
print(page)
用来检测一会写的算法的正确性