Loading... ## 题目 ![](https://s1.ax1x.com/2022/03/11/bTSv3F.png) ## 思路 用的最多的数字是1,所以计算1的个数就可以了 ## 题解 ```python count = 0 i = 0 while(count < 2021): i += 1 count += str(i).count("1") if count >2021: i -= 1 print(i) ``` ![](https://s1.ax1x.com/2022/03/11/bTp14f.png) Last modification:March 12, 2022 © Allow specification reprint Support Appreciate the author WeChat Like 0 如果觉得我的文章对你有用,请随意赞赏