mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
596be6ae11
5000-5099
25 lines
489 B
C++
25 lines
489 B
C++
#include <cstdio>
|
|
#include <algorithm>
|
|
#include <cstring>
|
|
using namespace std;
|
|
int N,T;
|
|
double sum,k;
|
|
int c;
|
|
int main(void)
|
|
{
|
|
int cas = 1;
|
|
scanf("%d", &T);
|
|
while(T--){
|
|
scanf("%d", &N);
|
|
sum = 0.0;
|
|
for(int i = 0; i < N; ++i){
|
|
scanf("%lf",&k);
|
|
sum += k;
|
|
}
|
|
for(int i = 0; i < N; ++i)
|
|
scanf("%d", &c);
|
|
printf("Case #%d: %.6f\n",cas++,(N + 1.0) / sum);
|
|
}
|
|
return 0;
|
|
}
|