시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB199918450.299%

문제

Your friend is what we can call a grammar nazi. He spends a lot of time on popular internet discussion forums. Unfortunately, he has a bad temper and loses his mind whenever someone incorrigibly befouls the English language, with unrelenting violations of grammatical and ortographic rules.

In order to avoid smashed keyboards, monitors and coffee-cup holders, you advice your friend to momentarily stop reading and count to ten each time he becomes angry, instead of smashing something.

Your friend becomes angry whenever he reads the following words or sequences of words:

  • “u”, “ur” instead of “you”, “your”.
  • “would of”, “should of” instead of “would have”, “should have”.
  • “lol” instead of “haha”. In fact he becomes angry even when a word contains “lol” as a substring.

You decide to write a computer program that reads sentences one by one, and for each sentence calculates how many times your friend will have uttered a number after reading said sentence. Your friend does not read out loud, so numbers that are part of the input-sentences should not be counted.

입력

The first line of the input consists of a single integer T, the number of test cases. The following T lines each contain one sentence; that is, one or more words separated by space.

  • 0 < T ≤ 50
  • A sentence consists of at most 100 characters, including spaces.
  • A word consists only of lower case letters between a and z, inclusively.
  • Two adjacent words are separated by exactly one space, and a sentence never has leading or trailing spaces.

출력

For each test case, output how many times your friend have said a number after reading the sentence.

예제 입력 1

4
u haz lolcats
my car is green
i have a lollipop
u should of lold

예제 출력 1

20
0
10
30

출처

Contest > IDI Open Contest > IDI Open 2013 A번