问题4052--Counting Stars

4052: Counting Stars

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 64 MB

题目描述

You are given a matrix, n rows and m columns.The matrix only contains three characters('#' or '.' or '*').Your task is to count the number of '*'.

输入

The first line is integer T(T <= 10), the number of test cases.The first line of each case contains two integers n (1 <= n <= 10) and m(1 <= m <= 10).Then n lines, each line contains m characters. There is a blank line after each test case.

输出

For each case, print the case number and the answer.You can find more in sample output.

样例输入 Copy

2
1 3
#*.

3 2
**
.#
*.

样例输出 Copy

Case 1: 1
Case 2: 3

来源/分类