#C6568. Count Faces in Reviews
Count Faces in Reviews
Count Faces in Reviews
In this problem, you are given a number of customer reviews. For each review, your task is to count the number of happy faces and sad faces. A happy face is represented by the string :)
and a sad face by :(
.
The input is read from standard input (stdin) and the output is printed to standard output (stdout). For each review, output two integers separated by a space, where the first integer is the count of happy faces and the second is the count of sad faces.
Ensure your solution handles multiple reviews correctly and processes each review independently.
inputFormat
The input starts with an integer denoting the number of reviews. Each of the next lines contains a single review which is a string that may include spaces and punctuation.
outputFormat
For each review, output a single line with two space-separated integers: the first representing the number of happy faces (:)
) and the second representing the number of sad faces (:(
).## sample
1
I am happy :)
1 0
</p>