for(int i=1;i<=n;i++){
if(i%k==0){
count++;
int arr[]=new int[count];
for(int j=count-1;j<count;j++){
arr[j]=i;
sum+=arr[j];
}
}else{
temp++;
int arr1[]=new int[temp];
for(int j=temp-1;j<temp;j++){
arr1[j]=i;
sum1+=arr1[j];
}
}
}
float average = (sum/(count*1.0f));
float average1= (sum1/(temp*1.0f));
float g= (float) (Math.floor(average*10)/10.0);
float j= (float) (Math.floor(average1*10)/10.0);
System.out.println(g+" "+j);
}
}