For Given Number
N find if its COLORFUL number or not
A number can be broken into different contiguous sub-subsequence parts. Suppose, a number 3245 can be broken into parts like 3 2 4 5 32 24 45 324 245. And this number is a COLORFUL number, since product of every digit of a contiguous subsequence is different
N = 23 2 3 23 2 -> 2 3 -> 3 23 -> 6 this number is a COLORFUL number since product of every digit of a sub-sequence are different. Output : 1
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.