Problem:
Score : 200 points

Problem Statement

Given is a sequence of N integers A_1, \ldots, A_N.

Find the (multiplicative) inverse of the sum of the inverses of these numbers, \frac{1}{\frac{1}{A_1} + \ldots + \frac{1}{A_N}}.

Constraints

1 \leq N \leq 100

1 \leq A_i \leq 1000

Input

Input is given from Standard Input in the following format:

N
A_1 A_2 \ldots A_N

Output

Print a decimal number (or an integer) representing the value of \frac{1}{\frac{1}{A_1} + \ldots + \frac{1}{A_N}}.

Your output will be judged correct when its absolute or relative error from the judge's output is at most 10^{-5}.

Sample Input 1

2
10 30

Sample Output 1

7.5

\frac{1}{\frac{1}{10} + \frac{1}{30}} = \frac{1}{\frac{4}{30}} = \frac{30}{4} = 7.5.

Printing 7.50001, 7.49999, and so on will also be accepted.

Sample Input 2

3
200 200 200

Sample Output 2

66.66666666666667

\frac{1}{\frac{1}{200} + \frac{1}{200} + \frac{1}{200}} = \frac{1}{\frac{3}{200}} = \frac{200}{3} = 66.6666....

Printing 6.66666e+1 and so on will also be accepted.

Sample Input 3

1
1000

Sample Output 3

1000

\frac{1}{\frac{1}{1000}} = 1000.

Printing +1000.0 and so on will also be accepted.

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections.Generic;//list用
using System.Text.RegularExpressions;//正規表現用
using System.Text;//StringBuilder用
using System.Collections;//ハッシュテーブル用
using System.Linq;
//デリゲータの使い方をマスターしたい
 
class Program
{
    Hashtable ht = new Hashtable();
    static List<double> s = new List<double>();
    static double result;
    static int K;
    StringBuilder strresult= new StringBuilder("");//Append(str ○○)関数で文字を追加していく
static double tmpre;
 
 
    static void Main()
    {
        //Modular mo = new Modular();//素数で割った余りを出せで使う★使い方：Modular型で宣言すると、その時点でのその素数で割った余りを保持する変数になる（powべき乗、Fac累乗、nCr組み合わせも関数として存在）()内は初期値
        //Node no = new Node<>();//UnionFind★Find関数で根っこの値を返す（根っこの値が一緒なら同グループ）、Unite関数で二つの木をくっつける
        //Permutation pe = new Permutation<>();//配列＆リストを並べ替えた場合の全ケースを出力★All関数でリスト形式で返す。
        //Treap tr = new Treap<>();//平衡二分木★Insert()関数で挿入、FindIndex()関数で該当する大きさの物が入るべき配列番号を返す。
        // delegate int CFunc();//下関数に使うデリゲータ。コイツと同じ引数と戻り値で関数作って、下の評価式の部分に関数名※（）いらないを入れる。
        //PriorityQueue pr = new PriorityQueue<>(評価式);//優先度付キュー★Enqueue()で格納、Dequeue()で取りだし。引数は評価式（大と小のどちらが優先か）。
        Read1();
        Read2(K);
      tmpre=1;
      for(int i=1;i<=K;i++){tmpre=tmpre*s[i-1];}
      double waruall=0;
      double waru=1;
      for(int j=1;j<=K;j++){
        waru=1;
      for(int i=1;i<=K;i++){if(i!=j){waru=waru*s[i-1];}}
        waruall+=waru;
      }
      result=tmpre/waruall;
        Console.WriteLine(result.ToString());
    }
 
 
    static void Read1()
    {
        string tmp = Console.ReadLine();
        K = int.Parse(tmp);
    }
 
    static void Read2(int kosuu)
    {
        string[] tmp = Console.ReadLine().Split(' ');
        for (int i = 0; i < kosuu; i++) { s.Add(double.Parse(tmp[i])); }
    }
 
}