Castellers competition X45001


Statement
 

pdf   zip

html

Input

A list of lines, where each line contains the name of a team followed by a ’-’ and the name of the tower built by that team.

Output

The representation of the human towers for all the teams, followed by the score of each team and the name of the winner or winners.

Public test cases
  • Input

    La colla castellera - 3 de 5 amb folre
    The Catalan Lions - 2 de 8
    En Pinxu i en Panxu - torre de 6 amb folre amb manilles
    Olakase - pilar de 5
    

    Output

                                        |                                                       
                                       | |                                                      
                                       | |                     |                                
                |                      | |                    | |                    |          
              | | |                    | |                    | |                    |          
              | | |                    | |                  | | | |                  |          
          | | | | | | |                | |                | | | | | |                |          
    ____/ | | | | | | | \________/ | | | | | | \________/ | | | | | | \________/ | | | | | \____
    La colla castellera: 30
    The Catalan Lions: 64
    En Pinxu i en Panxu: 35
    Olakase: 45
    The winner is The Catalan Lions with 64 points.
    
  • Input

    La colla castellera - 3 de 5 amb folre
    The Catalan Lions - 3 de 5 amb folre
    En Pinxu i en Panxu - torre de 4 amb folre amb manilles
    Olakase - 3 de 5 amb folre
    

    Output

                |                        |                                               |            
              | | |                    | | |                     |                     | | |          
              | | |                    | | |                  | | | |                  | | |          
          | | | | | | |            | | | | | | |            | | | | | |            | | | | | | |      
    ____/ | | | | | | | \________/ | | | | | | | \________/ | | | | | | \________/ | | | | | | | \____
    La colla castellera: 30
    The Catalan Lions: 30
    En Pinxu i en Panxu: 19
    Olakase: 30
    The winners are La colla castellera, The Catalan Lions and Olakase with 30 points.
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    Python