Function to return the count of B length integers which are less than C and they contain digits from set A [ ] only
static int solve ( Vector < Integer > A , int B , int C ) { Vector < Integer > digit = new Vector < Integer > ( ) ; int d , d2 ;