give array positive integer num remove smallest subarray possibly sum remain element divisible p it allow remove arrayreturn length small subarray need remove 1 impossibleA subarray define contiguous block element array Example 1input num 3142 p 6output 1explanation the sum element num 10 divisible 6 we remove subarray 4 sum remain element 6 divisible 6example 2input num 6352 p 9output 2explanation we remove single element sum divisible 9 the good way remove subarray 52 leave 63 sum 9example 3input num 123 p 3output 0explanation here sum 6 divisible 3 thus need remove Constraints1 numslength 1051 numsi 1091 p 109