/**
*注意:输入的两个数字的大小并不确定
*/
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h> using namespace std; int main()
{
int i,res1;
int res2,x,y;
while(~scanf("%d%d",&x,&y))
{
res1 = ;
res2 = ;
if(x > y)
{
i = x;
x = y;
y = i;
}
for(i = x ;i <= y;i ++)
{ // scanf("%d",&num);
if(i % != )
{
res1 += i * i * i;
}else{
res2 += i * i;
}
}
printf("%d %d\n",res2,res1);
}
//cout << "Hello world!" << endl;
return ;
}

HDU_2007的更多相关文章

随机推荐

  1. Python---tkinter---贪吃蛇(能用的)

    项目分析:构成:蛇 Snake食物 Food世界 World蛇和食物属于整个世界  class World:      self.snake      self.food上面代码不太友好我们用另外一个 ...

  2. 【NOIP2016提高A组8.12】通讯

    题目 "这一切都是命运石之门的选择." 试图研制时间机器的机关SERN截获了中二科学家伦太郎发往过去的一条短信,并由此得知了伦太郎制作出了电话微波炉(仮). 为了掌握时间机器的技术 ...

  3. GDOI2016总结

    前言 第一次GDOI,收获了很多. 这几天下来的生活有趣而精彩,尽管我没有高级的腐败工具,但是还是通过偷抢拐骗各种方法满足了腐败的欲望了. BUT,参加GDOI可不是为了玩耍,而是去提升自己的实力,磨 ...

  4. 【leetcode】1109. Corporate Flight Bookings

    题目如下: There are n flights, and they are labeled from 1 to n. We have a list of flight bookings.  The ...

  5. SpringBoot搭建基于Spring+SpringMvc+Mybatis的REST服务

    Maven Plugin管理 通常,让你的Maven POM文件继承 spring-boot-starter-parent,并声明一个或多个 Starter POMs依赖即可. spring-boot ...

  6. OpenCV Mat&Operations

    /*M/////////////////////////////////////////////////////////////////////////////////////////// IMPOR ...

  7. Move Controller UE4键位

    工作中需要,就总结了一下,如下图:

  8. Java 有关类字段的初始化

    实例代码 package text; public class MethodOverload { /** * @param args */ public static void main(String ...

  9. 在命令行运行java代码

    因为尝试将运行结果通过管道命令保存,所以尝试在命令行(不借助lde来运行java代码,结果折腾了半天) 仿照的是eclipse创建文件目录的方式 最终解决方法是: #/bin/bash root_di ...

  10. EventBus和Otto第三方构架

    代码 添加依赖:implementation 'org.greenrobot:eventbus:3.0.0'1注册并声明订阅者,然后发布事件最后解除注册 @Override protected voi ...