#include "stdio.h"
int main(){
 int n,m,k,num,i,sum=0;
 while(~scanf("%d%d",&n,&m)){
  num=n;k=2;
  while(num!=0){
   if(num>m){
    for(i=0;i<m;i++){
     sum+=k;
     k+=2;
    }
    printf("%d ",sum/m);
    sum=0;
    num-=m;
   }
   else if(num==m){
    for(i=0;i<m;i++){
     sum+=k;
     k+=2;
    }
    printf("%d",sum/m);
    sum=0;
    num=0;
   }
   else if(num<m){
    for(i=0;i<num;i++){
     sum+=k;
     k+=2;
    }
    printf("%d",sum/num);
    sum=0;
    num=0;
   }
  }
  puts("");
 }
 return 0;
}

hd oj2015的更多相关文章

  1. ATI Radeon HD 5450 with full QE/CI Support ( 转载 )

    ATI Radeon HD 5450 with full QE/CI Support - DSDT (Contains HDMI Audio Edit Too) & AGPM included ...

  2. XPS 15 9530使用Windows10频繁发生Intel HD Graphics 4600驱动奔溃的一种解决方法

    本人使用XPS 15 9530.集成显卡为Intel HD Graphics 4600.操作系统Windows 10 Pro,使用过程当中经常会发生集成显卡奔溃的问题,错误提示如下: Display ...

  3. Radeon HD 7850 vs Radeon R9 270X

    Radeon HD 7850 vs Radeon R9 270X  HW compare   Intro The Radeon HD 7850 comes with a GPU core speed ...

  4. 电影TS、TC、SCR、R5、BD、HD等版本是什么意思

    在很多电影下载网站的影片标题中我们都能看到,比如<刺杀希特勒BD版>.<游龙戏凤TS版>等,这些英文缩写都是什么意思呢?都代表什么画质?以下就是各个版本的具体含义: 1.CAM ...

  5. stm32类型cl、vl、xl、ld、md、hd的含义

    - startup_stm32f10x_ld_vl.s: for STM32 Low density Value line devices - startup_stm32f10x_ld.s: for ...

  6. 瑞昱Realtek(Realtek HD Audio Driver)音频声卡驱动R2.49 for Win7_Vista

    不管是在高端系列主板上,还是在低端系列主板上,我们都能看到Realtek瑞昱的身影,Realtek HD Audio Driver能够支持所有的Realtek HD Audio音频驱动.Realtek ...

  7. cocos2d-x 2.0.3 设置高清模式注意事项(已移除-hd方式)

    猴子原创,欢迎转载.转载请注明: 转载自Cocos2D开发网–Cocos2Dev.com,谢谢! 原文地址: http://www.cocos2dev.com/?p=304 在cocos2d-x 2. ...

  8. %hd %d %ld %u ......

    %d 有符号10进制整数 %ld 长整型 %hd短整型%md,m指定的是输出字段的宽度,默认左补空格, 如果数据的位数小于m,则左端补以空格,若大于m,则 按实际位数输出,如: printf(&quo ...

  9. 求刷Kindle Fire HD的方法

    前几天入手了台Amazon Kindle Fire HD 其系统是经过Amazon尝试改造过的Android,用起来很不爽,想刷个CM10之类的,求教程和工具.

随机推荐

  1. astyle 使用说明

    欢迎关注我的社交账号: 博客园地址: http://www.cnblogs.com/jiangxinnju GitHub地址: https://github.com/jiangxincode 知乎地址 ...

  2. OOAD与UML笔记

         UML基础介绍 1.UML的定义 统一建模语言(UML)是一种图形化的语言,它可以帮助我们在OOAD过程中标识元素.构建模块.分析过程并可通过文档说明系统中的重要细节 2.OOAD OO ...

  3. WebContentGenerator

    用于提供如浏览器缓存控制.是否必须有session开启.支持的请求方法类型(GET.POST等)等,该类主要有如下属性: Set<String>   supportedMethods:设置 ...

  4. 封装jquery时用到的东西

    顺序都是瞎拍的,就是明显分割用 1.将函数封装成$(' ')这种形式 把函数名起成$ $(各种选择器) $(selector) 2.有时候jquery可以继续加点,返回自己本身的元素 创建个构造函数, ...

  5. pvresize - Unix, Linux Command

    NAME pvresize - resize a disk or partition in use by LVM2 SYNOPSIS pvresize [-d|--debug] [-h|--help] ...

  6. ArcGIS发布地图服务

    一般做完矢量图绘制工作后,生成的.mxd文件只能在ArcMap中查看,为了方便用户进行浏览,我们需要发布地图服务. 目前为止最常用的就是在ArcGIS中发布地图服务. 今天也算是在做“发布地图服务”的 ...

  7. 1029c语言文法2理解

    program → external_declaration | program external_declaration <程序>→ <外部声明>|<程序>< ...

  8. Maximal Rectangle [LeetCode]

    Problem Description: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle co ...

  9. EF 7 Code First

    加载方式三种 1. Eager Loading 2. Lazy Loading 3.Explicit Loading 使用EF在与关系型数据库的交互中不可避免地需要加载数据,如何加载数据变得至关重要. ...

  10. .net调用存储过程碰到的一个问题

    问题描述 报错信息如下: Execution of user code in the .NET Framework is disabled. Enable "clr enabled" ...