1012.Numbers With 1 Repeated Digit(至少有 1 位重复的数字)
Description
Given a positive integer N
, return the number of positive integers less than or equal to N
that have at least 1 repeated digit.
给定正整数 N
,返回小于等于 N
且具有至少 1 位重复数字的正整数。
题目链接:https://leetcode.com/problems/numbers-with-1-repeated-digit/
个人主页:http://redtongue.cn or https://redtongue.github.io/
Difficulty: hard
Example 1:
Input: 20
Output: 1
Explanation: The only positive number (<= 20) with at least 1 repeated digit is