# [233. 数字 1 的个数](https://leetcode-cn.com/problems/number-of-digit-one) ## 题目描述 <!-- 这里写题目描述 --> <p>给定一个整数 n,计算所有小于等于 n 的非负整数中数字 1 出现的个数。</p> <p><strong>示例:</strong></p> <pre><strong>输入:</strong> 13 <strong>输出:</strong> 6 <strong>解释: </strong>数字 1 出现在以下数字中: 1, 10, 11, 12, 13 。</pre> ## 解法 <!-- 这里可写通用的实现逻辑 --> <!-- tabs:start --> ### **Python3** <!-- 这里可写当前语言的特殊实现逻辑 --> ```python ``` ### **Java** <!-- 这里可写当前语言的特殊实现逻辑 --> ```java ``` ### **...** ``` ``` <!-- tabs:end -->