We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This code is working, but after submitting it fails.Please someone help me
arr = []
n=int(input())
print(n)
for i in range(n):
arr.append(list(map(str, input().rstrip().split())))
for i in range(n):
for j in range(n):
if arr[i][j]=='S':
print((j+1),end=' ')
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Spies, Revised
You are viewing a single comment's thread. Return to all comments →
This code is working, but after submitting it fails.Please someone help me arr = [] n=int(input()) print(n) for i in range(n): arr.append(list(map(str, input().rstrip().split()))) for i in range(n): for j in range(n): if arr[i][j]=='S': print((j+1),end=' ')