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