#include <stdio.h> int main(){ int n; double v; double sum=0.0,avg=0.0; if (scanf("%d",&n)!=EOF){ for (int i=0;i<n;i++){ if (scanf("%lf",&v)!=EOF){ sum+=1.0/v; } } avg = 1.0*n/sum; printf("%.2lf",avg); } return 0; }
#include <stdio.h> int main(){ int n; double v; double sum=0.0,avg=0.0; if (scanf("%d",&n)!=EOF){ for (int i=0;i<n;i++){ if (scanf("%lf",&v)!=EOF){ sum+=1.0/v; } } avg = 1.0*n/sum; printf("%.2lf",avg); } return 0; }
天 : 20052
小时 : 467877
分钟 : 28072641
秒 : 1684358460