Longest Quote X16707


Statement
 

pdf   zip

html

Write a program that reads a text and prints the quoted fragment with the larger number of words in it. If there are several quoted fragments with longest size, only the first one must be printed. If there are no quoted fragments, the output must be No quotes found.

For instance, given the text:

Mary arrived home and said " what a day " . The dog looked up 
at her and replied " whof "

the answer should be: what a day

Input

The input is a sequence of tokens. Most tokens are words. Some of the tokens may be quotes or punctuation signs. Punctuations and quotes are always separated from nearby words with whitespaces. The input sequence may extend over more than one line. There is always an even number of quotes in the text.

Output

The output is the sequence of tokens inside the first quoted fragment with largest number of words. If there is no such sequence, the output is No quotes found.

Public test cases
  • Input

    Mary arrived home and said " what a day " . The dog looked up 
    at her and replied " whof "

    Output

    what a day
    
  • Input

    Neither Lorillard nor the researchers who studied the workers
    were aware of any research on smokers of the Kent 
    cigarettes . " We have no useful information on whether 
    users are at risk " said James A. Talcott of Boston Cancer
     Institute . A Lorillard spokewoman said " This is an old 
    story . We're talking about years ago before anyone heard
    of asbestos having any questionable properties. There is
    no asbestos in our products now " .  The Lorillard spokeswoman
    said asbestos was used in " very modest amounts " in making
    paper for the filters in the early 1950s and replaced with a 
    different type of filter in 1956 .
    

    Output

    This is an old story . We're talking about years ago before anyone heard of asbestos having any questionable properties. There is no asbestos in our products now
    
  • Input

    If the film contained dialogue , Mr. Lane's Artist would be 
    called a homeless person . So would the Little Tramp , for 
    that matter . I say " contained dialogue " because " Sidewalk
    Stories " isn't really silent at all . 
    

    Output

    contained dialogue
    
  • Input

    Write a main program that reads lines from the input, and prints
    the feeling it gets when reading words shorter than 5 letters
    and how humiliating it is to serve humans in such a way.

    Output

    No quotes found
    
  • Information
    Author
    ProAl1
    Language
    English
    Official solutions
    Python
    User solutions
    Python