Ballon d’or X63357


Statement
 

pdf   zip

html

Input Each line will contain the player number one member of the jury awards their points to. The first number is the number of the player with 3 points, the second one is the number of the player with 2 points and the third number is the player with 1 point. A zero will indicate the end of the input.

Output The top 3 players ordered by number of points. In case of draw the player with lower number will have better ranking. There will be a line with the number of the player and the number of points obtained.

Public test cases
  • Input

    10 7 11
    10 7 1
    10 11 7
    7 11 4
    7 10 11
    10 7 11
    11 7 10
    10 1 7
    0

    Output

    10 18
    7 16
    11 10
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    C++ Java
    User solutions
    C++ Python