您的位置:首页 > 其它

hdu 5053 the Sum of Cube(水)

2015-07-29 00:08 357 查看
题目链接:hdu 5053 the Sum of Cube

#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;
typedef long long ll;

int main () {
int cas;
scanf("%d", &cas);

for (int kcas = 1; kcas <= cas; kcas++) {
ll A, B, S = 0;
scanf("%I64d%I64d", &A, &B);
for (ll i = A; i <= B; i++)
S += i * i * i;
printf("Case #%d: %I64d\n", kcas, S);
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: