Driver Code
public static void main ( String [ ] args ) { int N = 5 ; int arr [ ] = { 1 , 2 , 3 } ; int K = arr . length ; System . out . println ( String . format ( " % .10f " , averageSetBits ( N , K , arr ) ) ) ; } }