1.A n digit number has n*(n+1)/2 sub-numbers.
2.For example, all possible sub-numbers of 975 are 9 7 5 97 75 975.
3.A number is called Lucky if all sub-numbers have different digit product.
4.Digit product of a number is product of its digits.
5.For example, the number 23 is Lucky.
6.Subsequences of it are 2, 3 and 23 and digit products are 2, 3 and 6 respectively
(All digit products are different). 975 is also lucky.
7.You have to complete the function returnIfLucky() which should return 1 if it is a luck number and 0 if not.
Input Format
Single line containing an integer 'N'.
Output Format
Print 1 if lucky else 0
Constraints
1<=N<=10^10
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
324
Output
1