#abc296b. B - Chessboard
B - Chessboard
Score : points
问题描述
在棋盘上定位一个棋子。
我们有一个包含8行和8列格子的网格。每个格子都有一个由以下方式确定的2字符名称。
- 左起第1列格子的名字的第一个字符是 a。类似地,左起第2列、第3列、……、第8列格子的名字的第一个字符依次是b、c、d、e、f、g、h。
- 从底部数起第1行格子的名字的第二个字符是 1。同样地,从底部数起第2行、第3行、……、第8行格子的名字的第二个字符依次是2、3、4、5、6、7、8。
例如,左下角的格子名为 a1,右下角的格子名为 h1,而右上角的格子名为 h8。
你将得到8个长度为8的字符串 ,它们代表网格的状态。
其中, 的第  个字符如果是 *,表示从顶部数起第  行、从左边数起第  列的格子上有一个棋子,否则为.。在  中,字符 * 出现恰好一次。请找出放置有棋子的格子的名字。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
Locate a piece on a chessboard.
We have a grid with rows and columns of squares. Each of the squares has a -character name determined as follows.
- The first character of the name of a square in the -st column from the left is a. Similarly, the first character of the name of a square in the -nd, -rd, , -th column from the left isb,c,d,e,f,g,h, respectively.
- The second character of the name of a square in the -st row from the bottom is 1. Similarly, the second character of the name of a square in the -nd, -rd, , -th row from the bottom is2,3,4,5,6,7,8, respectively.
For instance, the bottom-left square is named a1, the bottom-right square is named h1, and the top-right square is named h8.
You are given  strings , each of length , representing the state of the grid.
The -th character of  is * if the square at the -th row from the top and -th column from the left has a piece on it, and . otherwise. The character * occurs exactly once among . Find the name of the square that has a piece on it.
Constraints
-  is a string of length  consisting of .and*.
- The character *occurs exactly once among .
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
........
........
........
........
........
........
........
*.......
Sample Output 1
a1
As explained in the problem statement, the bottom-left square is named a1.
Sample Input 2
........
........
........
........
........
.*......
........
........
Sample Output 2
b3
update @ 2024/3/10 12:17:56
