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++…
the Sum of Cube Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 405 Accepted Submission(s): 224 Problem Description A range is given, the begin and the end are both integers. You should sum…
Description A range is given, the begin and the end are both integers. You should sum the cube of all the integers in the range. Input The first line of the input is T(1 <= T <= 1000), which stands for the number of test cases you need to solve. E…
水 #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)) { ;i<=t;i++) { sum=; scanf…
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…
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…
the Sum of Cube Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 162 Accepted Submission(s): 101 Problem Description A range is given, the begin and the end are both integers. You should sum t…