#include <stdio.h>
int main()
{
int a, b;int cnt = 0;
double sum = 0;
while (scanf_s("%d %d", &a, &b) != EOF) {
if (a == 0 &&b==0) break;
for (double i = a; i <= b; i++) {
sum += 1/(i*i);
}
cnt++;
printf( "case %d:%.5f",cnt,sum );
}
return 0;
}
算法竞赛二2-4子序列的和
最新推荐文章于 2024-11-06 20:06:49 发布