


Each test case contains a list of 8 space-separated strings.
For each test case, print ‘an integer corresponding to the number of pawns that can be captured by the Rook.
Print the output of each test case in a separate line.
You do not need to print anything. It has already been taken care of. Just implement the given function.
Board[i][j] = {‘R’ , ‘B’, ‘P’, ‘ * ’ }.
Time limit: 1 sec
In this approach, we will first iterate through the board and find the position of the white rook. After that, we will iterate left, right, up, and down and find if there exists a pawn or the path is blocked by the bishop. We will count the number of pawns under attack and return the answer.