题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5053

解题报告:用来陶冶情操的题,求a到b的三次方的和。

 #include<stdio.h>
#include<string.h>
#define INT __int64
int main()
{
int T,kase = ;
scanf("%d",&T);
INT a,b;
while(T--)
{
scanf("%I64d%I64d",&a,&b);
INT sum = ;
for(INT i = a;i <= b;++i)
sum += i * i * i;
printf("Case #%d: %I64d\n",kase++,sum);
}
return ;
}

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. 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 ...

  3. 2014上海网络赛 HDU 5053 the Sum of Cube

    水 #include <stdio.h> #include <stdlib.h> #include<math.h> #include<iostream> ...

  4. 杭电 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 ...

  5. hdu----(5053)the Sum of Cube(签到题,水体)

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

  6. HDU 1024 Max Sum Plus Plus --- dp+滚动数组

    HDU 1024 题目大意:给定m和n以及n个数,求n个数的m个连续子系列的最大值,要求子序列不想交. 解题思路:<1>动态规划,定义状态dp[i][j]表示序列前j个数的i段子序列的值, ...

  7. HDU 1003 Max Sum --- 经典DP

    HDU 1003    相关链接   HDU 1231题解 题目大意:给定序列个数n及n个数,求该序列的最大连续子序列的和,要求输出最大连续子序列的和以及子序列的首位位置 解题思路:经典DP,可以定义 ...

  8. HDU 1244 Max Sum Plus Plus Plus

    虽然这道题看起来和 HDU 1024  Max Sum Plus Plus 看起来很像,可是感觉这道题比1024要简单一些 前面WA了几次,因为我开始把dp[22][maxn]写成dp[maxn][2 ...

  9. Oracle分析函数 — sum, rollup, cube, grouping用法

    本文通过例子展示sum, rollup, cube, grouping的用法. //首先建score表 create table score( class  nvarchar2(20), course ...

随机推荐

  1. Raspberry Pi 3 --- Kernel Building and Run in A New Version Kernal

    ABSTRACT There are two main methods for building the kernel. You can build locally on a Raspberry Pi ...

  2. Setting up Django and your web server with uWSGI and nginx

    https://uwsgi.readthedocs.io/en/latest/tutorials/Django_and_nginx.html Setting up Django and your we ...

  3. zabbix监控模式、分布式、自动化

    适用场景: 1.监控主机多,性能瓶颈 2.多机房,防火墙 zabbix监控模式 针对agent来说 - 被动模式 - 主动模式(主动汇报服务端) 1)当监控主机超过300台,建议使用主动模式 2)当队 ...

  4. Python获取文件名

    本文实例讲述了python实现从URL地址提取文件名的方法.分享给大家供大家参考.具体分析如下: 如:地址为 http://www.jb51.net/images/logo.gif 要想从该地址提取l ...

  5. Java——URLEncoder和URLDecoder

    import java.net.URLDecoder; import java.net.URLEncoder; //========================================== ...

  6. CodeForces 459A Pashmak and Garden(水~几何-给两点求两点组成正方形)

    题目链接:http://codeforces.com/problemset/problem/459/A 题目大意: 给出两个点(在坐标轴中),求另外两个点从而构成一个正方形,该正方形与坐标轴平行. 如 ...

  7. codeforces 709B Checkpoints

    题目链接:http://codeforces.com/problemset/problem/709/B 题目大意: 第一行给出两个数 n,x.第二行 输入 n 个数. 要求:从x位置遍历 n-1 个位 ...

  8. ajax传输 基础一

    一个简单页面的传输 index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" &quo ...

  9. Podfile升级后的影响

    之前项目里用的Podfile都是版本 0.39 后面有一天电脑格盘重装以后cocoapods装的版本是 1.0.0.beta.6 那么问题来了,在下载或者clone一下项目后,经常是需要自己安装第三方 ...

  10. FPS

    游戏的FPS跟什么有关 http://zhidao.baidu.com/link?url=jZJoN_-MTC9fWCBSBaL5vezBp13MRSv8PdCcQMbwX5tiFGzxNEHe7UB ...