Problem · Math

Ashley Love Numbers

Learn this problem
EasyAtlassian logoAtlassianFULLTIMEOA

Problem statement

Count integers in the inclusive range [left, right] whose decimal representation contains no repeated digit.

Function

countLoveNumbers(left: int, right: int) → int

Examples

Example 1

left = 1right = 20return = 19

Every value except 11 has no repeated decimal digit.

Constraints

  • 0 <= left <= right <= 1000000

More Atlassian problems

drafts saved locally
public int countLoveNumbers(int left, int right) {
  // Write your code here.
}
left1
right20
expected19
checking account