_ueditor_page_break_tag_
#include<stdio.h>
int main(){
int n;
while(scanf("%d",&n)!=EOF){
int progression[100]={2};
for(int i=1; i<=n; i++){
progression[i] = 2 * (i + 1);
}
int m;
scanf("%d", &m);
int sum=0;
for(int i=0; i<n; i++){
int index=i%m+1;
sum += progression[i];
if(index==m||i==n-1){
printf("%d ", sum/index);
sum = 0;
}
}
printf("\n");
}
return 0;
}
0.0分
0 人评分