提交时间:2023-11-10 09:32:28
运行 ID: 238
a=int(input("")) def count_ones(a): return ''.join(str(i) for i in range(1, a+1)).count('1') print(count_ones(a))