godkingjay / LeetCode

LeetCode Solutions
MIT License
32 stars 67 forks source link

[PROBLEM] 233. Number of Digit One #183

Closed Bharathlax-2005 closed 10 months ago

Bharathlax-2005 commented 11 months ago

Difficulty

Hard

Problem Description

Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.

Example 1:

Input: n = 13 Output: 6

Example 2:

Input: n = 0 Output: 0

Constraints:

0 <= n <= 109

Link

https://leetcode.com/problems/number-of-digit-one/

Bharathlax-2005 commented 11 months ago

Can you please assign this issue to me @godkingjay?