H - the Sum of Cube(水题)】的更多相关文章

HDU5053the Sum of Cube(水题) 题目链接 题目大意:给你L到N的范围,要求你求这个范围内的全部整数的立方和. 解题思路:注意不要用int的数相乘赋值给longlong的数,会溢出. 代码: #include <cstdio> #include <cstring> const int N = 10005; typedef long long ll; ll t[N]; void init () { for (ll i = 1; i <= N - 5; i++…
A range is given, the begin and the end are both integers. You should sum the cube of all the integers in the range. InputThe first line of the input is T(1 <= T <= 1000), which stands for the number of test cases you need to solve. Each case of inp…
Sum it up 题目连接: https://www.hackerrank.com/contests/ieeextreme-challenges/challenges/sum-it-up Description Minka is very smart kid who recently started learning computer programming. His coach gave him a cyclic array A having N numbers, and he has to…
Cube Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.uestc.edu.cn/#/problem/show/80 Description As a student of the applied mathematics school of UESTC, WCM likes mathematics. Some day he found an interesting theorem that every positive inte…
题目链接: B. Modulo Sum time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a sequence of numbers a1, a2, ..., an, and a number m. Check if it is possible to choose a non-empty subse…
题目描述: Description Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t = 4, n = 6, and the list is [4, 3, 2, 2, 1, 1], then there are four different sums that equal…
the Sum of Cube Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 1   Accepted Submission(s) : 1 Problem Description A range is given, the begin and the end are both integers. You should sum the cu…
#include <iostream> #include <stdio.h> #include <algorithm> #define lson rt<<1,L,mid #define rson rt<<1|1,mid+1,R /* AC 水题 题意:给出n个数,两种操作 U i x 将第i个数改成x Q x y 查询[x,y]中两个数的和的最大值,这两个数不能为同一个 即只要求该区间第一大和第二大的数,他们的和即为答案 */ using nam…
H - RobotTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87326#problem/H Description A robot is a mechanical or virtual artificial agent, usually an electro-mechanical machine that is guided by a com…
Hard Disk Drive Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 83    Accepted Submission(s): 48 Problem Description Yesterday your dear cousin Coach Pang gave you a new 100MB hard disk drive (H…