L1-068 调和平均 分数 10
// 2'4"
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
long double res = 0;
for(int i = 1; i <= n; ++ i)
{
long double x;
cin >> x;
res += 1 / x;
}
res /= n;
cout << fixed << setprecision(2) << 1 / res << endl;
return 0;
}
浙公网安备 33010602011771号