12772 - GEC1506 Scoreboard parsing (Advance)   

Description

Calculate the score of students from the NTHU OJ scoreboard based on the passed test cases in the question.

Multiple lines of score information, where each line is an answering record for a user account.

Input

The number of questions for a contest could have more than one.

The format of each line after line 1 is given as: 

Rank, User, problem1_passed_case,problem1_total_cases, problem2_passed_cases,problem2_total_cases2, ... , problemN_passed_cases,problemN_total_cases, Total Cases

 

 

Examples :

1,GEC2_105071035,3,3,2,5, ...,0,1,12

 

The 3,3 denotes passed_cases,total_cases of problem1.

The 2,5 denotes passed_cases,total_cases of problem2, and so on.

The score of a question is calculated as the number of passed test cases divided the number of test cases within a question.

For example, the score of  problem1 is 100. And the score of problem2 is 40 (=2/5*100).

 

The score of a student is calculated as the average of all questions.

 

Output

The score for each student of the given contest with the format:

User,Score

Note that

  1. The order of the output score should follow the same order of the input.
  2. The score should have 2 decimals.

Sample Input  Download

Sample Output  Download

Tags




Discuss