UMNOZAK | 프로그래밍의 벗 PivotOJ
PivotOJ

UMNOZAK

시간 제한: 3000ms메모리 제한: 256MB출처: CHC 2008 Croatian Olympiad in InformaticsBOJ 2974

문제

The digit-product of a positive integer is the product of the number's decimal digits. For example, the digit-product of 2612 is 2 · 6 · 1 · 2 = 24. 

The self-product of a number is the product of the number and its digit-product. For example, the self-product of 2612 is 2612 · 24 = 62688. 

Write a program that, given two positive integers A and B, calculates the number of positive integers whose self-product is between A and B, inclusive. 

입력

The first and only line contains two integers A and B (1 ≤ A ≤ B < 1018). 

출력

Output should consist of a single integer, the number of positive integers whose twist is between A and B. 

예제

예제 1

입력
20 30
출력
2

예제 2

입력
145 192
출력
4

예제 3

입력
2224222 2224222
출력
1
코드를 제출하려면 로그인하세요.