#include <stdio.h>
#include <stdlib.h>
#include<math.h>
#include<iostream>
#define LL long long
using namespace std; int main()
{
int t;
int a,b;
int cas;
LL sum;
while(~scanf("%d",&t))
{
for(int i=;i<=t;i++)
{
sum=;
scanf("%d%d",&a,&b);
for(int j=a;j<=b;j++)
{
sum+=pow(j,);
}
printf("Case #%d: %lld\n",i,sum);
}
}
return ;
}

2014上海网络赛 HDU 5053 the Sum of Cube的更多相关文章

  1. hdu 5053 the Sum of Cube(上海网络赛)

    the Sum of Cube Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  2. 2015上海网络赛 HDU 5478 Can you find it 数学

    HDU 5478 Can you find it 题意略. 思路:先求出n = 1 时候满足条件的(a,b), 最多只有20W对,然后对每一对进行循环节判断即可 #include <iostre ...

  3. 2015上海网络赛 HDU 5475 An easy problem 线段树

    题意就不说了 思路:线段树,维护区间乘积.2操作就将要除的点更新为1. #include<iostream> #include<cstdio> #include<cstr ...

  4. HDU 5053 the Sum of Cube

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5053 解题报告:用来陶冶情操的题,求a到b的三次方的和. #include<stdio.h> ...

  5. HDU 5053 the Sum of Cube(简单数论)

    http://acm.hdu.edu.cn/showproblem.php?pid=5053 题目大意: 求出A^3+(A+1)^3+(A+2)^3+...+B^3和是多少 解题思路: 设f(n)=1 ...

  6. UVA LA 7146 2014上海亚洲赛(贪心)

    option=com_onlinejudge&Itemid=8&page=show_problem&category=648&problem=5158&mosm ...

  7. ccpc 网络赛 hdu 6155

    # ccpc 网络赛 hdu 6155(矩阵乘法 + 线段树) 题意: 给出 01 串,要么询问某个区间内不同的 01 子序列数量,要么把区间翻转. 叉姐的题解: 先考虑怎么算 \(s_1, s_2, ...

  8. 杭电 5053 the Sum of Cube(求区间内的立方和)打表法

    Description A range is given, the begin and the end are both integers. You should sum the cube of al ...

  9. HDU 5045 5047 5050 5053(上海网络赛E,F,I,L)

    HDU 5045 5047 5050 5053 太菜了,名额差点没保住.吓尿..赶紧开刷树链抛分 5045:状压DP.压缩10个人.因为两个人不能差2以上,所以能够用01表示 5047:推推公式就可以 ...

随机推荐

  1. spoj 237

    好牛的题  哈哈 #include <cstdio> #include <algorithm> #define S(n) scanf("%d",&n ...

  2. 读取tiled地图

    原地址:http://www.unity蛮牛.com/thread-20854-1-1.html   Tile是一个非常好用的地图编辑器,一直以来我都在找支持tilemap的unity2D插件,但是找 ...

  3. Web Api 入门

    http://www.cnblogs.com/developersupport/p/WebAPI-Security.html http://www.cnblogs.com/r01cn/archive/ ...

  4. c/c++中一些高级函数的使用

    setvbuf 函数名: setvbuf 功 能: 把缓冲区与流相关 用 法: int setvbuf(FILE *stream, char *buf, int type, unsigned size ...

  5. boost在linux下的编译和使用

    上一篇boost在windows可以正常的使用了,但是在linux下不行. [尝试一:使用和windows同一套代码编译,编译时报错] 我是在Ubuntu使用共享文件夹的方式和windows使用的同一 ...

  6. SPRING IN ACTION 第4版笔记-第八章Advanced Spring MVC-007-给flowl加权限控制<secured>

    States, transitions, and entire flows can be secured in Spring Web Flow by using the <secured> ...

  7. Foreman--管理PuppetClient

    一. 环境: 1. server: puppetmaster+activemq+foreman1.3 server1.xxx.com(10.8.1.201) 2. client: fedora 19 ...

  8. API HOOK技术

    API HOOK技术是一种用于改变API执行结果的技术,Microsoft 自身也在Windows操作系统里面使用了这个技术,如Windows兼容模式等. API HOOK 技术并不是计算机病毒专有技 ...

  9. Microsoft.Data.ConnectionUI.DataConnectionDialog

    MicrosoftVisualStudio里面的资源之数据库连接配置 这个功能的实现主要是用了Microsoft.Data.ConnectionUI.dll和Microsoft.Data.Connec ...

  10. bzoj2906

    显然分块,由于颜色也有区间,我们的ans[l,r,k]表示块l和块r颜色1~k的权值和所以我们块的大小要设为n^(2/3),其它没什么说的,比较水 ..,..,..] of int64; g:..,. ...