Bet-n-win X67280


Statement
 

pdf   zip

html

Input The first line of the input is the number of bets, followed by a sequence of bets in the form of the name of a friend and then their bet in the format local-visitant. The last line is the actual result of the match.

Output The output of the program is the total amount of coins collected, number of different players and the list of players ordered by the amount of money won from most to least. In case of a tie, order alphabetically the players.

Public test cases
  • Input

    6
    John 3-1 
    Peter 1-2
    Laura 3-0
    John 3-0
    Mark 3-1
    Peter 0-3
    3-1
    

    Output

    Total 18
    Players 4
    John 9
    Mark 9
    Laura 0
    Peter 0
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    Python