#include<stdio.h>
int main() {
int n[100], m[100];
int c = 0;
for (int i = 0; ; i++) {
scanf_s("%d%d", &n[i],&m[i]);
if (n[i] == 0 && m[i] == 0)break;
c++;
}
for (int i = 0; i < c; i++) {
double s = 0;
for (int j = n[i]; j <= m[i]; j++) {
s += (double)1 / j / j;
}
printf("Case %d:%lf\n", i+1, s);
}
return 0;
}
子序列的和(subsequence)
最新推荐文章于 2022-01-16 17:52:18 发布