Word search control X70027


Statement
 

pdf   zip

html

Input

The input is structured as follows: - First line: a list of the words to search. - Second line: the number of rows. - As many strings as the number of rows, representing the text where the words have to be found.

Output

The output must be the percentage of the characters of the text forming the input word with respect to the total amount of characters in the text, with exactly 2 decimals.

Public test cases
  • Input

    SOL MARIA DAVID LAURA DANI
    6 
    RMLAURA
    XYOOVDU
    DISRSIQ
    AOTDIVD
    NVHFHAX
    IIANYDT
    

    Output

    The words given occupy 42.86% of the grid.
    
  • Input

    COW DEER HEN DOG HORSE PIG
    7
    NDOYEKNO
    ZNWOCWRD
    ZEDEAEOG
    HENEENOD
    WRUDKAOG
    ZOOETGLI
    MHORSESP
    

    Output

    The words given occupy 37.50% of the grid.
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    Python