2014上海网络赛 HDU 5053 the Sum of Cube
水
#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的更多相关文章
- hdu 5053 the Sum of Cube(上海网络赛)
the Sum of Cube Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...
- 2015上海网络赛 HDU 5478 Can you find it 数学
HDU 5478 Can you find it 题意略. 思路:先求出n = 1 时候满足条件的(a,b), 最多只有20W对,然后对每一对进行循环节判断即可 #include <iostre ...
- 2015上海网络赛 HDU 5475 An easy problem 线段树
题意就不说了 思路:线段树,维护区间乘积.2操作就将要除的点更新为1. #include<iostream> #include<cstdio> #include<cstr ...
- HDU 5053 the Sum of Cube
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5053 解题报告:用来陶冶情操的题,求a到b的三次方的和. #include<stdio.h> ...
- 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 ...
- UVA LA 7146 2014上海亚洲赛(贪心)
option=com_onlinejudge&Itemid=8&page=show_problem&category=648&problem=5158&mosm ...
- ccpc 网络赛 hdu 6155
# ccpc 网络赛 hdu 6155(矩阵乘法 + 线段树) 题意: 给出 01 串,要么询问某个区间内不同的 01 子序列数量,要么把区间翻转. 叉姐的题解: 先考虑怎么算 \(s_1, s_2, ...
- 杭电 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 ...
- HDU 5045 5047 5050 5053(上海网络赛E,F,I,L)
HDU 5045 5047 5050 5053 太菜了,名额差点没保住.吓尿..赶紧开刷树链抛分 5045:状压DP.压缩10个人.因为两个人不能差2以上,所以能够用01表示 5047:推推公式就可以 ...
随机推荐
- js数组的迭代
以下介绍两种数组形式的迭代:一是简单的数组:二是数组里面套Object(json格式). 一.var arr=[1,2,3] var arr=[1,2,3] for (var i = 0; i < ...
- hibernate简介(Session,几种状态,方法······等)
1.Hibernate是什么? Hibernate是一个开放源代码的对象关系映射框架,它对JDBC进行了非常轻量级的对象封装,使得Java程序员可以随心所欲的使用对象编程思维来操纵数 ...
- sqlmap映射继承机制及映射字段顺序与SQL查询字段顺序无关
<typeAlias alias="TblSpPartsinfo" type="com.bn.car.biz.supply.dao.po.PartsInfoPO&q ...
- MySql 使用正则表达式
MySql 用where 子句对正则表达式提供了支持,允许你指定正则表达式,注意mysql仅支持多数正则表达式实现的一个很小的子集. 1.基本字符匹配: SELECT prod_name FROM p ...
- 基于Oracle OCI的数据访问C语言接口ORADBI .
基于Oracle OCI的数据访问C语言接口ORADBI cheungmine@gmail.com Mar. 22, 2008 ORADBI是我在Oracle OCI(Oracle 调用接口)基础 ...
- 选择排序的MPI实现
#include "stdafx.h" #include "mpi.h" #include <stdio.h> #include <math. ...
- eclipse实现JavaWeb应用增量打包
很多情况下,项目是不允许全量发布的,所以你得把有做修改的文件一个个挑出来,如果有成千上百的文件,你是不是要头大了? 以下方法应该可以让你得到解救!前提是你是用装有svn plugin的eclipse上 ...
- Android ScrollView+ViewPager+PullToRefreshListView
想达到此界面的风格 然后ViewPage里面第一个Fragment是一个瀑布流 这个瀑布流要有加载跟多 在ScrollView中,嵌套ViewPager,在ViewPager的每页使用Fragment ...
- Android的Handler几种常见的传值方式
public class handlerThread2 extends Activity { @Override protected void onCreate(Bundle savedInstanc ...
- IE Web 开发支持将迁移到 StackOverflow
http://stackoverflow.com/questions/tagged/internet-explorer