Problem of the day
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
******** ******** ***R***P ******** ***P**** ******** ***P**** ********
2
The white rook will attack the pawns at d5 and h6. Hence, the answer is 2.
***P**** ***B**** P**R***P ******** ***P**** ******** ***P**** ********
3