Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Expectation
Description Eric has constructed an easy scheme for generating random integer numbers. His scheme inputs an integer Now Eric is planning to construct more complicated schemes. The first one will consist of two independent random generators with their outputs forwarded to his favorite Eric’s friend Nick studies math. Nick said that the scheme is very interesting, and the most interesting thing is the expectation of the result. Now they both think how to calculate the expectation. Could you help them? Remember that the expectation of the random variable is its average value. For a variable , where ξ being equal to i.Input The first line of the input contains the number Output For each case output the expected value of the new Eric’s scheme with at least two digits after the decimal point. Output each result on a separate line. Sample Input 2 3 4 Sample Output 1.33 1.50 Source Northeastern Europe 2005, Northern Subregion |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator