/**
*注意:输入的两个数字的大小并不确定
*/
#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. JS高阶函数--------map、reduce、filter

    一.filter filter用于对数组进行过滤.它创建一个新数组,新数组中的元素是通过检查指定数组中符合条件的所有元素. 注意: filter() 不会对空数组进行检测. 注意: filter() ...

  2. 6411. 【NOIP2019模拟11.06】上网

    题目描述 Description Input Output 若无解,则输出"Impossible". 否则第一行输出"Possible",第二行输出 n 个正整 ...

  3. TCP服务器并发编程构架:完成端口IOCP模式

    windows下socket网络编程模式:IOCP 完成端口 1)IOCP异步事件的获取放到操作系统的网络驱动层来处理,实际上反而是降低了编程难度, 2)同时对于多线程的并发调度,也放到操作系统级别来 ...

  4. Knapsack Cryptosystem

    Knapsack Cryptosystem 超大背包 折半查找 #include<bits/stdc++.h> using namespace std; typedef long long ...

  5. Oracle update或alter表被锁住的问题

    \\ 查询被锁的对象.来源.sid和serial select object_name, machine, s.sid, s.serial# from v$locked_object l, dba_o ...

  6. 【转】vux (scroller)上拉刷新、下拉加载更多

    1)比较关键的地方是要在 scroller 组件上里加一个 ref 属性 <scroller :lockX="true" height="-170" :p ...

  7. mvn 与 pom.xml

    mvn 安装 wget http://mirrors.hust.edu.cn/apache//maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.t ...

  8. cookie格式化

    #coding=utf- import requests url = 'http://www.baidu.com' f=open(r'cookies.txt','r') cookies={} for ...

  9. 搭建spring项目,无法创建RequestMappingHandlerMapping异常

    异常详情: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMa ...

  10. 测开之路九十九:js函数、事件、window窗体对象

    函数:function 函数名(参数列表) 事件 单击:onclick()表单提交:onsubmit()鼠标经过:onmouseover()值改表时:onchange() window窗体对象转跳:w ...