All Tracks Problem

Vanya and Students again !
Tag(s):

Muito fácil, Very-Easy, とてもやさしい, 非常に簡単, 非常简单

Problem
Editorial
Analytics

Vanya has to now choose some Students from her class to go to the International Mathematical Olympiad. She knows for each student of her class, $$3$$ pieces of information about them, i.e. their 'Name', 'Age' and 'Aptitude'.

Vanya, to make work easier for her, and more difficult for you, defines the Winning Quotient of the Students choosen for the Olympiad from her class to be the Summation of their Aptitude Levels. In short, assume Vanya chooses Students $$x$$, $$y$$ and $$z$$. She considers the Winning Quotient to be Aptitude Level(x) + Aptitude Level(y) +Aptitude Level(z) in case of such a selection.

Now, considering that Vanya randomly chooses any arbitrary subset of Students from her class to visit the Olympiad, where the size of this subset has to be at least $$1$$, and the probability of each subset being choosen is equal, Vanya wishes to know the Expected Value of the Winning Quotient of the choosen Students.

She finds this task rather challenging, and wants you to help her out. Can you do it ?

Input Format

Table : Students

Field Type
Name text
ID text
Aptitude int

Output Format

Round down your answer to 2 decimal places, and then select it to output.

Sample Explanation

Sample Students Table :

Name ID Aptitude
Micro 12abcd 1
Vanya 13abcd 2
Rhezo 14abcd 3

Output

Answer
3.43

Input Constraints :

The input table shall consist of no more than 10 rows. The Aptitude level of each student shall lie in the range from $$1$$ to $$10$$ inclusive. The Name and ID of each Student shall consist of at least 1 and no more than 10 characters.

Time Limit: 5 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: MySQL, PostgreSQL, MSSQL, Oracle_Db

CODE EDITOR

Initializing Code Editor...
Your Rating:

Contributor

Notifications
View All Notifications