Codey and Hide-and-Seek
https://www.hackerrank.com/contests/codenection-2023-preliminary-round-closed-category/challenges/cn-c2
Question
In a world that dances with riddles, Codey has embarked on a grand game of hide-and-seek within a mysterious 2D grid of size n
x m
. The grid exclusively contains two elements: Codey, represented by the character #
, and empty cells, marked as .
.
Your mission is to uncover Codey's hiding spot by finding the coordinates where Codey is lurking. If you succeed, you will happily report back with the coordinates (row and column). However, if Codey is too tricky and you can't find it in the grid, you'll report as your answer.
Input Format
The first line contains two integers, n
and m
, where n
represents the number of rows and m
represents the columns in the 2D grid.
The following n
lines provide a representation of the 2D grid.
Constraints
It is guaranteed that there will only be at most one #
in the grid.
Output Format
Output Codey's coordinate (row and column) in a single line, separated by a space if Codey is located within the grid. Output if Codey is not found in the grid.
Sample Inputs:
Last updated