mardi 25 février 2020

WHILE STUDYING JAVA, I MADE CONTACT WITH THIS QUESTION AND I AM COMPLETELY LOST, I DON'T KNOW IF I CAN GET ASSISTANCE ON THIS? [closed]

Input File: search.txt Output File: standard output Elah has a search engine in his phone and he uses it to search about application in his phone by writing one letter in the search text box The result of this search are all applications that have the written letter in position of its name, Ex: character this strings "cbd", "hello". So when you write the character a in the text box of the search engine, the result will be 3 applications abc","bac","cba" Elah is asking you to write a program like his search engine but the program result should be the number of applications that have this letter in their names. Note: the lower case letters equals to the upper case letters in the application name or in the text box of the search engine in this strings "abc", "bac","cba" but not Input First line contains T, the number of test cases. For each test case, first line contains two integers N, O (I <=NO <= 10), the number of applications in Elah's phone and the number of queries. N lines each contains single string a - application name and having a length at most 100 letters and contains lowercase and uppercase letters. lines each contains single letter s- the written uppercase or lowercase letter in the text box of the search engine.

Output: For each test case, print of application will appear in the search result when we write this letter in the text box of the search engine. lines, cach line contain integer number that the number of application Will appear in the search result when we write this letter in the text box of the search engine.the image contains the expected output for the program

Aucun commentaire:

Enregistrer un commentaire