偶数求和
http://acm.hdu.edu.cn/showproblem.php?pid=2015
1
2 #include
3 #include
4
5 int main() {
6 int n, m;
7 while(scanf("%d%d", &n, &m)!=EOF) {
8 int i;
9 for(i = 2; i <= 2*n; i+= 2*m) {
10 if(2*n-i <= 2*(m-1)) {
11 printf("%d\n", n+i/2);
12 }
13 else
14 printf("%d ", i+m-1);
15 }
16 }
17 }