统计各位数字都不同的数字个数-中等
2025-4-20
| 2025-4-20
Words 255Read Time 1 min
type
status
date
slug
summary
tags
category
icon
password

题目:

给你一个整数 n ,统计并返回各位数字都不同的数字 x 的个数,其中 0 <= x < 10n
来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/SNJvJP 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
示例 1:
示例 2:
提示:
  • 0 <= n <= 8

思路:

结果:

notion image
image-20220411230121288
统计是给定字符串前缀的字符串数目统计位数为偶数的数字
Loading...