标签:des style blog http color io os ar for
2 1 3 2 5
Case #1: 36 Case #2: 224
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
typedef __int64 ll;
using namespace std;
int main() {
int t, a, b, cas =1 ;
scanf("%d", &t);
while (t--) {
scanf("%d%d", &a, &b);
ll sum = 0;
for (int i = a; i <= b; i++)
sum += (ll)i * i * i;
printf("Case #%d: ", cas++);
printf("%I64d\n", sum);
}
return 0;
}
标签:des style blog http color io os ar for
原文地址:http://blog.csdn.net/u011345136/article/details/39620381