report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Beautiful number - FlandreOJ: Flandre Online Judge

Beautiful number

Time limit: 500 ms
Memory limit: 256 MB
A number is considered beautiful if it is divisible by all of its digits. This also means that a beautiful number, in its decimal representation, does not contain the digit $0$. Count the number of beautiful numbers in the range $[L, R]$. ### Input - One line containing two integers $L, R$. ### Output - Print an integer, the count of beautiful numbers. ### Constraints - $1 \le L \le R \le 10^{18}$. ### Example Input: ``` 10 123 ``` Output: ``` 18 ```
Digit DP
Unlucky number
Digit Sum
Divisible
Prime digit sum
Non-palindrome number
Yet another XOR problem
Taboo substring
Balanced number
Equation
Beautiful number
Constructing numbers
Topic
Dynamic Programming
Rating 2100
Solution (0) Solution