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 static System.Console;
using static System.Math;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TemplateAlgorithm
{

    /// <summary>
    /// 素集合(UnionFindTree)
    /// </summary>
    class DisjointSet
    {
        public List<int> Rank { get; set; }
        public List<int> Parent { get; set; }

        public DisjointSet()
        {
            Rank = new List<int>();
            Parent = new List<int>();
        }

        public DisjointSet(int size)
        {
            Rank = Enumerable.Repeat(0, size).ToList();
            Parent = Enumerable.Repeat(0, size).ToList();

            for (var i = 0; i < size; i++) { MakeSet(i); }
        }

        public void MakeSet(int x)
        {
            this.Parent[x] = x;
            this.Rank[x] = 0;
        }

        public int FindSet(int x)
        {
            if (!IsRoot(x))
            {
                Parent[x] = FindSet(Parent[x]);
            }
            return Parent[x];
        }

        public void Unite(int x, int y)
        {
            x = FindSet(x);
            y = FindSet(y);

            if (Rank[x] > Rank[y])
            {
                Parent[y] = x;
            }
            else
            {
                Parent[x] = y;
                if (Rank[x] == Rank[y])
                {
                    Rank[y]++;
                }
            }
        }

        public bool IsSame(int x, int y) => FindSet(x) == FindSet(y);

        public bool IsRoot(int x) => x == Parent[x];
    }

    class Program
    {
        public const long Inf = (long)1e18;
        public const double eps = 1e-6;
        public const string alfa = "abcdefghijklmnopqrstuvwxyz";
        public const string ALFA  = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        public const int MOD = 1000000007;

        static void Main(string[] args)
        {
            int n = IO.ReadInt();
            int[] data = IO.ReadIntArr();


            double d = 0;
            for (var i = 0; i < n; i++)
            {            
                d += (double)1 / data[i];
            }
            IO.Cout(1.0/d);
        }

        #region MIN,MAX

        /// <summary>
        /// 最大値を返す
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="vals"></param>
        /// <returns></returns>
        public static T MaxValue<T>(params T[] vals) => vals.Max();

        /// <summary>
        /// 最小値を返す
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="vals"></param>
        /// <returns></returns>
        public static T MinValue<T>(params T[] vals) => vals.Min();
        #endregion

        #region IO

        /// <summary>
        /// IO
        /// </summary>
        public class IO
        {
            public static string ReadStr(bool isTrim = false) => (isTrim) ? Console.ReadLine().Trim() : Console.ReadLine();
            public static int ReadInt() => int.Parse(ReadStr());
            public static uint ReadUInt() => uint.Parse(ReadStr());

            public static long ReadLong() => long.Parse(ReadStr());
            public static ulong ReadULong() => ulong.Parse(ReadStr());

            public static decimal ReadDecimal() => decimal.Parse(ReadStr());
            public static double ReadDouble() => double.Parse(ReadStr());
            public static string[] ReadStrArr(char separator = ' ') => Console.ReadLine().Split(separator);
            public static int[] ReadIntArr() => Array.ConvertAll(ReadStrArr(), int.Parse);
            public static long[] ReadLongArr() => Array.ConvertAll(ReadStrArr(), long.Parse);

            public static ulong[] ReadULongArr() => Array.ConvertAll(ReadStrArr(), ulong.Parse);

            public static decimal[] ReadDecimalArr() => Array.ConvertAll(ReadStrArr(), decimal.Parse);
            public static double[] ReadDoubleArr() => Array.ConvertAll(ReadStrArr(), double.Parse);
            
            public static void Cout<T>(T value) => Console.WriteLine(value);
            public static void CoutJoin<T>(T[] values, string separator = " ") => Cout(string.Join(separator, values));
        }

        #endregion();
    }
}