Driver Code
public static void main ( String [ ] args ) { int N = 5 , M = 22 , L = 14 , R = 16 ; int [ ] arr = { 17 , 11 , 10 , 8 , 15 } ; System . out . print ( countMagicNumbers ( 0 , 0 , arr , N , M , L , R ) ) ; } }